apt vs apt-get: which one to use
The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
- tool
- apt
- compares
- apt vs apt-get
apt and apt-get use the same package database and repositories, so they install the same packages. apt is designed for interactive use: it combines the common parts of apt-get and apt-cache, shows a progress bar and colours, and may change its output between releases. apt-get keeps a stable interface and output. Type apt yourself; write apt-get (and apt-cache) in scripts and Dockerfiles.
Criterion by criterion
| Criterion | apt | apt-get |
|---|---|---|
| Meant for | people at a terminal | scripts and automation |
| Output | progress bar, colours; may change | stable |
| In a pipe | warns: apt does not have a stable CLI interface | no warning |
| Search and show | apt search, apt show | apt-cache search, apt-cache show |
| List packages | apt list --installed / --upgradable | no equivalent (use dpkg-query) |
| upgrade | may install new dependencies | never installs new packages (use dist-upgrade) |
| Edit sources | apt edit-sources | no |
Equivalent commands
| apt | apt-get / apt-cache |
|---|---|
| apt update | apt-get update |
| apt install pkg | apt-get install pkg |
| apt upgrade | apt-get upgrade --with-new-pkgs |
| apt full-upgrade | apt-get dist-upgrade |
| apt remove / purge / autoremove | apt-get remove / purge / autoremove |
| apt search term | apt-cache search term |
| apt show pkg | apt-cache show pkg |
Sources
Related pages
commands · aptList installed packages with apt and dpkgList installed packages on Debian and Ubuntu with apt list --installed, show manually installed ones with apt-mark showmanual, and export the list to reuse.errors · aptapt: E: Unable to locate packageapt install fails with E: Unable to locate package when package lists are outdated, the name is wrong, or the package is in a repository that is not enabled.codes · aptdpkg -l status codes: ii, rc, un, iU, iF explainedThe status codes at the start of dpkg -l lines: desired action, then current state. ii means installed, rc removed with config left, iU unpacked, iF failed.