1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-03 12:35:22 +02:00
tldr/pages/linux/apt.md

39 lines
983 B
Markdown
Raw Normal View History

2016-12-22 00:09:01 +01:00
# apt
> 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>.
> More information: <https://manned.org/apt.8>.
2016-12-22 00:09:01 +01:00
- 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
- Search packages by name or description:
2016-12-22 00:09:01 +01:00
`apt search {{package}}`
- 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}}`
- 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
- 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
- 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`
- List all installed packages:
`apt list {{[-i|--installed]}}`