tldr/pages/linux/apt-get.md

38 lines
1007 B
Markdown
Raw Normal View History

# apt-get
> Debian and Ubuntu package management utility.
> Search for packages using `apt-cache`.
> More information: <https://manpages.debian.org/latest/apt/apt-get.8.html>.
- Update the list of available packages and versions (it's recommended to run this before other `apt-get` commands):
`apt-get update`
- Install a package, or update it to the latest available version:
`apt-get install {{package}}`
- Remove a package:
`apt-get remove {{package}}`
- Remove a package and its configuration files:
`apt-get purge {{package}}`
- Upgrade all installed packages to their newest available versions:
`apt-get upgrade`
- Clean the local repository - removing package files (`.deb`) from interrupted downloads that can no longer be downloaded:
2020-09-04 23:46:48 +01:00
`apt-get autoclean`
- Remove all packages that are no longer needed:
2016-08-21 23:01:13 +01:00
`apt-get autoremove`
- Upgrade installed packages (like `upgrade`), but remove obsolete packages and install additional packages to meet new dependencies:
`apt-get dist-upgrade`