apt
Debian/APT package management
-
apt
Search, install, remove and upgrade packages with apt, including how to see what it will do before it does it, and which commands are safe in a script.
-
apt-cache
Search the package cache, read a package's record, follow its dependencies, and use policy to see which version apt would install and from where.
-
apt-file
Tested apt-file examples: searching Debian's file index for a command you have not installed, and the substring trap in a plain pattern.
-
dpkg
Query what's installed, find which package owns a file, inspect a .deb before trusting it, and repair a half-finished install: the layer beneath apt.
-
Could not get lock /var/lib/dpkg/lock-frontend
apt refuses to run because something else is already installing. Modern apt tells you exactly which process, and deleting the lock file is the wrong fix.
-
The following packages have been kept back
apt-get upgrade refuses to install new packages, so an upgrade that needs one is held back instead. What the message means and the three things that cause it.
-
The repository is not signed
apt cannot verify a repository's signature: the NO_PUBKEY and Missing key errors. What Debian 13 changed, and why apt-key adv is no longer the fix.
-
apt vs apt-get
The same package ships both, and they do the same job. What differs is who each is written for, and only one of them is safe in a script.
-
remove vs purge vs autoremove
Not three strengths of one operation. Two of them differ over configuration files; the third acts only on packages you never asked for.
-
APT essentials
The apt, apt-get, and dpkg commands that cover almost everything you'll do to manage packages on Debian, and how remove differs from purge.
-
Installing a .deb by hand
Install a downloaded .deb the way that resolves its dependencies, see what dpkg -i leaves behind when you don't, and read the package before you trust it.
-
Listing what is installed
List installed packages reliably with dpkg-query, tell what you asked for from what came along, and find out when a package arrived from the logs.
-
Debian's release channels
What stable, testing, unstable and backports each mean, why the suite name in your sources file matters more than you think, and which to run.
-
Adding a third-party repository safely
Why apt-key is gone, how Signed-By scopes a vendor's key to their repository alone, and how to stop that repository replacing the rest of your system.
-
Which package provides a file
Trace a file to the package that ships it: dpkg -S for what is installed, apt-file for what is not, and the files that belong to no package at all.