-
Notifications
You must be signed in to change notification settings - Fork 344
/
apt-get
30 lines (22 loc) · 884 Bytes
/
apt-get
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
---
tags: [ packaging ]
---
# To fetch package list:
apt-get update
# To download and install package updates:
apt-get upgrade
# To download and install the updates AND install new necessary packages
# AND remove any packages that stand in the way of the upgrade:
apt-get dist-upgrade
# Full command:
apt-get update && apt-get dist-upgrade
# To install a new package(s):
apt-get install <package>...
# To download a package without installing it. (The package will be downloaded in your current working dir)
apt-get download <package>
# To change cache dir and archive dir (where .deb are stored):
apt-get -o Dir::Cache="/path/to/destination/dir/" -o Dir::Cache::archives="./" install ...
# To show apt-get installed packages:
grep 'install ' /var/log/dpkg.log
# To silently keep old configuration during batch updates:
apt-get update -o DPkg::Options::='--force-confold' ...