community man page

apt

GNU

Package manager for Debian-based distributions. Intended as a user-friendly alternative to `apt-get` for interactive use. For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.

8 examples·source: tldr · CC-BY·status: verified
Reading is open to everyone. Suggesting a flag, fixing an example or adding a recipe is opening to verified-email accounts soon — every change is moderated before it goes live.
curl https://curlhub.sh/man/apt
same page, in your terminal

Examples

Update the list of available packages and versions (recommended before running other `apt` commands) GNU

sudo apt update

Search packages by name or description GNU

apt search package

Search packages by name only (supports wildcards like `*`) GNU

apt list package

Show detailed information about a package GNU

apt show package

Install a package, or update it to the latest version GNU

sudo apt install package

Remove a package (use `purge` instead to also remove configuration files) GNU

sudo apt remove package

Upgrade all installed packages to their latest versions GNU

sudo apt upgrade

List all installed packages GNU

apt list [-i|--installed]