2025-03-14 21:59:59 -06:00
|
|
|
# apt
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
> Package manager for Debian-based distributions.
|
|
|
|
|
> Intended as a user-friendly alternative to `apt-get` for interactive use.
|
2025-03-14 21:59:59 -06:00
|
|
|
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
|
|
|
|
|
> More information: <https://manned.org/apt.8>.
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- Update the list of available packages and versions (recommended before running other `apt` commands):
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`sudo apt update`
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- Search packages by name or description:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`apt search {{package}}`
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- Search packages by name only (supports wildcards like `*`):
|
|
|
|
|
|
|
|
|
|
`apt list {{package}}`
|
|
|
|
|
|
|
|
|
|
- Show detailed information about a package:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`apt show {{package}}`
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- Install a package, or update it to the latest version:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`sudo apt install {{package}}`
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- Remove a package (use `purge` instead to also remove configuration files):
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`sudo apt remove {{package}}`
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- Upgrade all installed packages to their latest versions:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`sudo apt upgrade`
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- List all installed packages:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`apt list {{[-i|--installed]}}`
|