The Advanced Package Tool , or APT , is a free software user interface that works with core libraries to handle the setup and removal of software on the Debian , Slackware and other Linux distributions . [3] APT simplifies the process of managing software on unix-like computer systems by automating the retrieval, configuration and installation of software packages , or from precompiled files or by compiling source code. [3]

APT was originally designed as a front-end for dpkg to work with Debian’s .deb packages, but it has also been modified with the RPM Package Manager system via APT-RPM . [4] The Fink project has ported APT to Mac OS X for some of its own package management tasks, [5] and APT is also available in OpenSolaris .

Usage

There has been a aptprogram since version 1.0; Apt is a collection of tools distributed in a named apt . A significant part of apt is defined in a C ++ library of functions; Apt also includes command-line programs for dealing with packages, which use the library. Three such programs are aptapt-getand apt-cache. They are commonly used in examples of apt because they are simple and ubiquitous. The aptpackage is of ” important ” priority in all current Debian releases, and is therefore installed in a default Debian installation. Apt can be considered a front-end to dpkg, friendlier than the older dselectfront-end. While dpkgperforming actions on individual packages,

APT is often the best of Debian’s features, [6] [7] [8] [9] which Debian developers attribute to the strict quality controls in Debian’s policy. [10] [11]

A major feature in APT is the way it calls dpkg – it does topological sorting from the list of packages to be installed or removed and calls dpkg in the best possible sequence. In some cases, it uses the --force options in dpkg. However, it is necessary to calculate how to avoid the reason dpkg requires the action to be forced.

Installing software

The user will be notified by email as soon as possible. Each package name is just as part of the package, not a fully qualified filename (for instance, in a Debian system, libc6 would be the provided argument, 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 case-based management system, 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 rent configuration 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, Installed) packages.

Apt provides other 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 be downgraded and rendered 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

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:

  • Update is used to resynchronize the package index files from their sources. The lists of available accommodation are specified in /etc/apt/sources.list . For example, when using a Debian archive, this command retrieves and scans the Packages.gz files, so that information about new and updated packages is available.
  • Upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list . Packages currently installed and retrieved and upgraded; Under no circumstances are currently installed packages or packages not already installed retrieved and installed. New versions of currently installed packages, which can not be upgraded.
  • Dist-upgrade , in addition to performing the function of upgrade; Apt-get has a “smart” conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. [12] aptitude has a smarter dist-upgrade feature called full-upgrade. [13]

Apt-file

Apt-file is a file that contains all the files in a package. It is packaged separately from the main APT utilities.

Example to find a package:

$ Apt-file update # Fetch the files in the cache
$ apt-file find vmlinuz # Find all packages providing a filename vmlinuz
linux-image-4.8.0-17-generic: /boot/vmlinuz-4.8.0 -17-generic
linux-image-4.8.0-17-lowlatency: /boot/vmlinuz-4.8.0-17-lowlatency
linux-image-4.8.0-19-generic: /boot/vmlinuz-4.8.0-19 -generic
linux-image-4.8.0-19-lowlatency: /boot/vmlinuz-4.8.0-19-lowlatency
linux-signed-image-4.8.0-17-generic: /usr/lib/linux/vmlinuz-4.8 .0-17 generic.efi.signature-
linux-image-4.8.0-17 signed-lowlatency: /usr/lib/linux/vmlinuz-4.8.0-17-lowlatency.efi.signature
linux-image--signed 4.8.0-19-generic: /usr/lib/linux/vmlinuz-4.8.0-19-generic.efi.
Linux-signed-image-4.8.0-19-lowlatency: /usr/lib/linux/vmlinuz-4.8.0-19-lowlatency.efi.signature
ltsp-client-core: / usr / share / ltsp / cleanup. d / 50-vmlinuz
needrestart: / usr / lib / needrestart / vmlinuz-get-Version
$ apt-file find /boot/vmlinuz-4.8.0-17-generic # find aussi from a full path
linux-image-4.8.0 -17-generic: /boot/vmlinuz-4.8.0-17-generic
$ dpkg -S vmlinuz # dpkg is an alternative listing less packages
linux-image-4.8.0-16-generic: /boot/vmlinuz-4.8.0 -16-generic
linux-image-4.8.0-17-generic: /boot/vmlinuz-4.8.0-17-generic
linux-image-4.8.0-11-generic: /boot/vmlinuz-4.8.0-11 -generic
linux-image-4.4.0-9136-generic: /boot/vmlinuz-4.4.0-9136-generic
linux-image-4.8.0-19-generic: /boot/vmlinuz-4.8.0-19-generic

Configuration and files

/ Etc / apt has the apt configuration folders and files.

Apt-config is the APT Configuration Query program. [14] apt-config dump shows the configuration. [15]

Files

  • /etc/apt/sources.list : Locations to fetch packages from.
  • /etc/apt/sources.list.d/ : Additional source list fragments.
  • /etc/apt/apt.conf : APT configuration file.
  • /etc/apt/apt.conf.d/ : APT configuration file fragments.
  • / Etc / apt / preferences : version preferences file. This is where you would specify ” pinning “, ie preference to get certain packages from a separate source or from a different version of a distribution.
  • / Var / cache / apt / archives / : storage area for retrieved package files.
  • / Var / cache / apt / archives / partial / : storage area for package files in transit.
  • / Var / lib / apt / lists / : storage area for each resource package specified in sources.list
  • / Var / lib / apt / lists / partial / : storage area for state information in transit.

Sources

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 CDROM rental can be arranged. 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 can be used as well, using apt-cdrom [16] or adding file: / [17] to the source list file. Apt-cdrom can use the -d option (ie a hard disk or a USB keydrive). The Debian CDs for 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). APT pinning to control which sources should be preferred.

APT pinning

The APT pinning feature allows administrators to force the APT to choose particular versions of packages that may be available in different versions from different repositories. This is the first step in the evolution of the system.

In order to do this, the pins in APT’s preferences file ( / etc / apt / preferences ) must be modified, [18] though graphical front-ends often make pinning simpler.

Front-ends

Synaptic Package Manager is one of the front-ends available for APT

Several other front-ends to APT exist, which provide more advanced installation functions and more intuitive interfaces. These include:

  • Synaptic , a GTK + graphical user interface
  • Ubuntu Software Center , a GTK + graphical user interface developed by the Ubuntu project
  • Aptitude , a client console with CLI and ncurses -based TUI interfaces
  • KPackage , part of KDE
  • Adept Package Manager , a graphical user interface for KDE (deb, rpm, bsd)
  • PackageKit , a freedesktop.org frontend.
  • GDebi , a GTK + -based tool sponsored for Ubuntu. (There is also a Qt version, available in the Ubuntu repositories a gdebi-kde.)
  • Apt-cdrom , a way to add a new CDROM to APT’s list of available sources.lists (list of available repositories). It is necessary to use apt-cdrom to add CDs to the APT system, it can not be done by hand.
  • Apt-zip , a way to use apt with removable media , specifically USB flash drives .
  • AptURL , an Ubuntu software package that enables end-user applications to install with a single-click. [19] [20]
  • Cydia , a package manager for jailbroken iOS based on APT (ported to iOS as part of the Telesphoreo project). [21] [22]
  • Gnome-apt , a GTK + / GNOME -widget-based graphical front-end. Developed by Havoc Pennington [23]
  • Muon Discover (previous Muon Software Center) , a Qt-based graphical user interface
  • Hildon Application Manager (Maemo Application) , Maemo front-end
  • Apticron , a service designed to be run via cron to email notices of pending updates to a sysadmin.
  • APT daemon , a front-end That Runs as-a- Service to allow users to install software through PolicyKit and is in turn the framework used by Ubuntu Software Center (along with the Linux Mint Software Manager ).

APT front-ends can:

  • Search for new packages.
  • Upgrade packages.
  • Install or remove packages.
  • Upgrade the whole system to a new release.

APT front-ends can be installed or upgraded, as well as the installation and maintenance of the system.

History

The original effort that led to the apt-get program was the dselect replacement project known by its codename deity . [24] This project was commissioned by Brian White, the Debian Release Manager at the time. The very first 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. [25]

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 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. [26]

APT was introduced in 1998 and original test builds were circulated on IRC. The first Debian version, which was released on 9 March 1999. [27]

In the end the original project of the replacing the dselect user interface (UI) was a failure. Work on the 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. UIs on top of libapt-pkg.

0.6 of APT which introduces the Secure APT feature, using strong cryptographic signing to authenticate the package repositories. [28]

See also

  • Free software portal
  • Alien
  • AppStream
  • apt-file
  • APTonCD
  • GNU Guix
  • wajig
  • MANCOOSI
  • ZYpp

References

  1. Jump up^ Julian Andres Klode (13 March 2016). “Accepted apt 1.0.9.8.3 (source all amd64) into proposed-updates-> stable-new, proposed-updates” . Debian Package Tracker . The Debian Project . Retrieved 11 April 2016 .
  2. Jump up^ “Accepted apt 1.3 ~ exp1 (source) into experimental” . DebianPackage Tracker . The Debian Project. 11 May 2016 . Retrieved 11 May 2016 .
  3. ^ Jump up to:b “apt-get (8) – Linux man page” . linux.die.net. Archivedfrom the original on 16 May 2008 . Retrieved 2008-05-12 .
  4. Jump up^ “APT-RPM” . apt-rpm.org. Archived from the original on 21 April 2008 . Retrieved 2008-05-12 .
  5. Jump up^ “Fink – About” . www.finkproject.org. Archived from the original on 11 May 2008 . Retrieved 2008-05-12 .
  6. Jump up^ Byfield, Bruce (2004-12-09). “An apt-get primer” . Archivedfrom the original on 2010-04-19.
  7. Jump up^ “From the archives: the best distros of 2000” . Tux Radar.
  8. Jump up^ Dorgan, David (2004-01-19). “Migrating to Debian” . linux.ie. Archived from the original on 2010-04-19.
  9. Jump up^ “Mobile Linux development Familiar with and have minimal Debian” . Mobile Tux.
  10. Jump up^ “Why Debian” .
  11. Jump up^ “Debian policy manual” .
  12. Jump up^ “Linux Man pages” .
  13. Jump up^ “Discussion on dist-upgrade vs. full-upgrade” .
  14. Jump up^ “Apt-Config” .
  15. Jump up^ “Query APT Configuration Using apt-config – Debian Admin” .
  16. Jump up^ “apt-cdrom” .
  17. Jump up^ ie Deb file: / mnt / install stable main contrib. non-free.
  18. Jump up^ “Apt Pinning” . Debian Wiki. Archived from the original on 4 October 2006 . Retrieved 2006-09-19 .
  19. Jump up^ “AptURL” . Ubuntu Wiki . Retrieved 16 April 2016 .
  20. Jump up^ “OzOS | apt: foo” .
  21. Jump up^ Jurick, David (2009). IPhone Hacks: Pushing the iPhone and iPod touch Beyond Their Limits . O’Reilly Media, Inc. p. 20. ISBN  9780596516642 . Retrieved January 18, 2013 .
  22. Jump up^ Adhikari, Richard (March 20, 2008). “Android, Schmandroid: Linux on the iPhone” . LinuxInsider . Retrieved January 18,2013 .
  23. Jump up^ The Evolution of Debian Package Management Systems, by Glenn Mullikin, AUUGN, Dec 2001, Page 50,gnome-apt was written by Havoc Pennington
  24. Jump up^ “Deity Mailing List, 1997-04” .
  25. Jump up^ “Deity Mailing List, 1998-03” .
  26. Jump up^ “Deity Mailing List, 1998-03” .
  27. Jump up^ “A Brief History of Debian” . Debian.org.
  28. Jump up^ “Secure APT” . Debian Wiki . Retrieved 2006-09-05 .

Leave a Reply

Your email address will not be published. Required fields are marked *