What is the apt system?

Being able to install and remove packages is great, but the basic software for doing this (known as dpkg) does exactly that and nothing more. This is fine if you download one or two packages by hand, but quickly becomes cumbersome when you are trying to manage a large number of packages. Furthermore, if your shiny new package requires software you haven't yet installed, you have to download the newly required software by hand. And if you later decide to remove the no-longer-shiny package, these extra packages will linger on your system, consuming hard drive space, unless you manually remove them.

Obviously, all of this manual labor is a tedious chore, and so most package management systems come with software which takes care of some or all of it for you. apt is a common base on which to build these programs: in addition to aptitude, programs such as synaptic and apt-watch make use of apt.

apt works by keeping a list of the packages that can be downloaded from Debian on your computer. This list is used to find packages that need to be upgraded and to install new packages. apt can also solve many dependency problems automatically: for instance, when you choose to install a package, it will find any additional required packages and install those as well.

When working with a package manager based on apt, such as aptitude, you will typically perform three basic tasks: you will update the list of packages that are available by downloading new lists from the Debian servers, you will select which packages should be installed, upgraded, or removed, and finally, you will commit your selections by actually performing the installations, removals, etc.

apt-based package managers read the list of sources -- repositories of Debian packages -- from the file /etc/apt/sources.list. The format and contents of this file are beyond the scope of this document, but are described in the manual page sources.list(5).