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