apthelp: Often used stuff in the apt package management familyAlan Robert ClarkFebruary 8, 2019 |
The apt system sources are configured in /etc/apt/sources.list
.
deb http://debian.mirror.ac.za/debian/ stretch main contrib non-free deb http://debian.mirror.ac.za/debian/ stretch-updates main contrib non-free deb http://debian.mirror.ac.za/debian/ stretch-backports main contrib non-free deb http://security.debian.org/debian-security stretch/updates main contrib non-free
Useful package-level commands are apt-get
, apt-cache
, and
the per-package command dpkg
.
apt | -s | simulate = dry-run |
update | Updates the database. RUN BEFORE ANY apt command. | |
dist-upgrade | Same as upgrade , but sorts dependancies. | |
install pkg1 pkg2… | ||
download pkg1 pkg2… | puts .deb in current dir. Proxy! | |
remove pkg1 pkg2… | ||
purge pkg1 pkg2… | removes, including configuration files. | |
autoremove | removes old dependancies. BEWARE! Do not leave too long! | |
check | database sanity. | |
clean | get rid of .deb files. | |
apt-cache | search x y | Anything with x y (-d Descrip too) |
show pkg | info | |
policy pkg | installed? | |
pkgnames pkg | Uninstalled pkgs available | |
showpkg pkg | Deps of uninstalled pkg | |
depends pkg | Deps of installed pkg | |
stats | Database statistics. | |
dpkg | -l pkg | lists installed pkg. All w/o pkg. |
-L pkg | lists files installed by pkg | |
-S filename | lists pkg to which filename belongs | |
This document was translated from LATEX by HEVEA.