Advanced Packaging Tool
This is the NEDM Vandal speaking. I have returned for this very special day.
16886255625516889277012962122655399212 48620991621001279262164388920912101004 01023992013910921688620948624362101055 16013912092916886209480401022612095516 01390401022612090901165516013990923101 11621290120962909001111612105792620991 12092904010212119212101055622648579262 09915543880129010901168862099157021626 01095502909288122792559296551092923912 09292992319226121692010992291204624362 10101102109216889243011110291209291210 10013104010243621010579290045510122792 55111031261688884811311104165739558812 27921291010129166290926209168892119229 91129092556209571416014309
The Advanced Package Tool, or APT, is a free software user interface that works with core libraries to handle the installation and removal of software on the Debian Linux distribution and its variants. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.
APT was originally designed as a front-end for dpkg to work with Debian's .deb packages, but it has since been modified to also work with the RPM Package Manager system via APT-RPM. The Fink project has ported APT to Mac OS X for some of its own package management tasks, and APT is also available in OpenSolaris.
There has been an
A major feature in APT is the way it calls dpkg — it does topological sorting of the list of packages to be installed or removed and calls dpkg in the best possible sequence. In some cases, it utilizes the --force options in dpkg. However, it only does this when it is unable to calculate how to avoid the reason dpkg requires the action to be forced.
The user indicates one or more packages to be installed. Each package name is phrased as just the name portion of the package, not a fully qualified filename (for instance, in a Debian system, libc6 would be the argument provided, not libc6_1.9.6-2.deb). Notably, apt automatically gets and installs packages upon which the indicated package depends (if necessary). This was an original distinguishing characteristic of apt-based package management systems, as it avoided installation failure due to missing dependencies, a type of dependency hell.
Another such distinction is remote repository retrieval of packages. apt uses location configuration file (/etc/apt/sources.list) to locate the desired packages, which might be available on the network or a removable storage medium, for example, and retrieve them, and also obtain information about available (but not installed) packages.
apt provides other command options to override decisions made by apt-get's conflict resolution system. One option is to force a particular version of a package. This can downgrade a package and render dependent software inoperable, so the user must be careful.
Finally, the apt_preferences mechanism allows the user to create an alternative installation policy for individual packages.
The user can specify packages by POSIX regular expression.
apt-get is the command line package management tool supplied with the Debian package apt. APT searches its cached list of packages and lists the dependencies that must be installed or updated.
Triggers are the treatment of deferred actions.
APT retrieves, configures and installs the dependencies automatically.
Update, upgrade and dist-upgrade
Other commands used in apt-get:
Configuration and files
/etc/apt has the apt configuration folders and files.
APT relies on the concept of repositories in order to find software and resolve dependencies. For apt, a repository is a directory containing packages along with an index file. This can be specified as a networked or CDROM location. The Debian project keeps a central repository of over 25,000 software packages ready for download and installation.
Any number of additional repositories can be added to APT's sources.list configuration file (/etc/apt/sources.list) and then be queried by APT. Graphical front-ends often allow modifying sources.list more simply (apt-setup). Once a package repository has been specified (like during the system installation), packages in that repository can be installed without specifying a source and will be kept up-to-date automatically.
In addition to network repositories, compact discs and other storage media (USB keydrive, hard disks...) can be used as well, using apt-cdrom or adding file:/ to the source list file. Apt-cdrom can specify a different folder than a cd-rom, using the -d option (i.e. a hard disk or a USB keydrive). The Debian CDs available for download contain Debian repositories. This allows non-networked machines to be upgraded. Also one can use apt-zip.
Problems may appear when several sources offer the same package(s). Systems that have such possibly conflicting sources can use APT pinning to control which sources should be preferred.
The APT pinning feature allows administrators to force APT to choose particular versions of packages which may be available in different versions from different repositories. This allows administrators to ensure that packages are not upgraded to versions which may conflict with other packages on the system, or that have not been sufficiently tested for unwelcome changes.
In order to do this, the pins in APT's preferences file (/etc/apt/preferences) must be modified, although graphical front-ends often make pinning simpler.
Several other front-ends to APT exist, which provide more advanced installation functions and more intuitive interfaces. These include:
APT front-ends can:
APT front-ends can list the dependencies of packages being installed or upgraded, ask the administrator if packages recommended or suggested by newly installed packages should be installed too, automatically install dependencies and perform other operations on the system such as removing obsolete files and packages.
The original effort that led to the apt-get program was the dselect replacement project known by its codename deity. This project was commissioned by Brian White, the Debian Release Manager at the time. The very first functional version of apt-get was called dpkg-get and was only intended to be a test program for the core library functions that would underpin the new UI.
Much of the original development of APT was done on IRC, so records have been lost. The 'Deity Creation Team' mailing list archives include only the major highlights.
The Deity name was abandoned as the official name for the project due to concerns over the religious nature of the name. The APT name was eventually decided after considerable internal and public discussion. Ultimately the name was proposed on IRC, accepted and then finalized on the mailing lists. As originally used, APT is not an acronym, but a proper name. The name gained mindshare during IRC discussions due to the variety of possible acronym expansions and it was ultimately decided that the official use of APT would be as a proper name and no official expansion would ever be presented by the team.
APT was introduced in 1998 and original test builds were circulated on IRC. The first Debian version that included it was Debian 2.1, released on 9 March 1999.
In the end the original goal of the Deity project of replacing the dselect UI was a failure. Work on the user interface (UI) portion of the project was abandoned (the UI directories were removed from the CVS system) after the first public release of apt-get. The response to APT as a dselect method and a command line utility was so great and positive that all development efforts focused on maintaining and improving the tool. It was not until much later that several independent people built UIs on top of libapt-pkg.
The final push of the first APT era was to build a complete dpkg replacement (libapt-inst). This project was also a failure, however the partial code found a use as part of the secretive 'Project Betsy' program, which resulted in the highly efficient apt-ftparchive and libapt python bindings. After this, the original author faded away and maintainership of APT languished.
Eventually, a new team picked up the project, began to build new features and released version 0.6 of APT which introduced the Secure APT feature, using strong cryptographic signing to authenticate the package repositories.