forked from cheat/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apt
39 lines (28 loc) · 916 Bytes
/
apt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
tags: [ packaging ]
---
# To find packages matching <phrase>:
apt search <phrase>
# To show information on a package:
apt show <package>
# To fetch package list:
apt update
# To download and install the updates and (UNLIKE apt-get) install new necessary packages:
apt upgrade
# To download and install the updates AND install new necessary packages
# AND remove packages that stand in the way of the upgrade - use with caution:
apt dist-upgrade
# To perform a full system upgrade:
apt update && apt upgrade # use dist-upgrade carefully if needed
# To install package(s):
apt install <package>...
# To uninstall package(s):
apt remove <package>...
# To remove automatically all unused packages:
apt autoremove
# To list dependencies of a package:
apt depends <package>...
# To remove packages and delete their config files:
apt purge <package>...
# To list all packages installed:
apt list --installed