2016-12-21 23:09:01 +00:00
|
|
|
# apt
|
|
|
|
|
|
|
|
> Package management utility for Debian based distributions.
|
2019-09-13 11:40:06 +01:00
|
|
|
> Recommended replacement for apt-get when used interactively in Ubuntu versions 16.04 and later.
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-09-23 11:27:18 +01:00
|
|
|
- Update the list of available packages and versions (it's recommended to run this before other `apt` commands):
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-04-17 16:02:14 +01:00
|
|
|
`sudo apt update`
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-09-23 11:27:18 +01:00
|
|
|
- Search for a given package:
|
2016-12-21 23:09:01 +00:00
|
|
|
|
|
|
|
`apt search {{package}}`
|
|
|
|
|
2017-04-17 10:47:20 +01:00
|
|
|
- Show information for a package:
|
|
|
|
|
|
|
|
`apt show {{package}}`
|
|
|
|
|
2017-09-23 11:27:18 +01:00
|
|
|
- Install a package, or update it to the latest available version:
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-04-17 16:02:14 +01:00
|
|
|
`sudo apt install {{package}}`
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-09-23 11:27:18 +01:00
|
|
|
- Remove a package (using `purge` instead also removes its configuration files):
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-04-17 16:02:14 +01:00
|
|
|
`sudo apt remove {{package}}`
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-09-23 11:27:18 +01:00
|
|
|
- Upgrade all installed packages to their newest available versions:
|
2016-12-21 23:09:01 +00:00
|
|
|
|
2017-04-17 16:02:14 +01:00
|
|
|
`sudo apt upgrade`
|
2019-04-24 13:01:22 +01:00
|
|
|
|
|
|
|
- List all packages:
|
|
|
|
|
|
|
|
`apt list`
|
|
|
|
|
|
|
|
- List installed packages:
|
|
|
|
|
|
|
|
`apt list --installed`
|