One of Debian’s greatest features is the apt package manager, and therefore the apt-get program for getting, managing and installing packages. Here I have compiled a quick reference of some of the more commonly used commands.
This will install a package.
apt-get -f install
This will force the install of a package.
apt-get install –reinstall
This will reinstall an already installed package.
This will upgrade packages to the most recent versions. Packages will not be updated if it would require other packages to be either removed or installed.
This is a lot like apt-get upgrade, except that it will remove or install any programs needed to ensure that all packages are at the most recent version.
This will remove a package and leave any configuration files.
apt-get remove –purge
This will remove a package and also remove all configuration files.
This clears out the local repository of retrieved package files.
Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless.
This will remove packages that were automatically installed to satisfy dependencies for some package and that are no more needed.
This will search the descriptions of packages for the requested pattern.
This will show the description of the supplied package.
This will give information about a package, including configuration files, a description, dependencies, and other facts.
Will attempt to find out which package contains this file.
This will return a list of all files in this package.
This will attempt to run a command, most often “./configure”, and attempt to download any packages that are needed to fill it’s dependencies. It takes the dependency hunting out of building from source.
This will update the package lists to the most recently available versions (within the selected repositories as seen in /etc/apt/sources.list).
Pingback: apt-get quick reference | Solarum - Information For Everyone