Glossary

apt

apt (Advanced Package Tool) is the high-level package manager on Debian, Ubuntu, and their derivatives. It is a friendlier front-end to the older apt-get and apt-cache, with unified output, progress bars, and a more consistent command set. Under the hood, apt works with dpkg, the low-level tool that actually installs .deb files.

sudo apt update                    # refresh package lists
sudo apt upgrade                    # upgrade installed packages
sudo apt install nginx              # install
sudo apt remove nginx               # remove, keep config
sudo apt purge nginx                # remove, delete config too
apt search keyword                  # search available
apt show nginx                      # package details
sudo apt autoremove                 # clean up orphaned dependencies

Repositories are configured under /etc/apt/sources.list and /etc/apt/sources.list.d/, each entry giving a URL, a distribution codename (focal, jammy, bookworm), and components (main, restricted, universe, multiverse on Ubuntu). Packages are cryptographically signed and verified against keys in /etc/apt/trusted.gpg.d/ or /etc/apt/keyrings/.

apt is one of the most polished package managers in the Linux world. Its dependency resolver is strong enough that most upgrades "just work", and its ecosystem of pre-built binary packages covers nearly everything.

Related terms: dpkg, Debian, Ubuntu, Package Manager

Discussed in:

Also defined in: Textbook of Linux