Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

APT (software)

From Wikipedia, the free encyclopedia
(Redirected fromAdvanced Packaging Tool)
Free software package management system
For other uses, seeAPT (disambiguation) § Computing and software.
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This articlemay be too technical for most readers to understand. Pleasehelp improve it tomake it understandable to non-experts, without removing the technical details.(December 2024) (Learn how and when to remove this message)
This articlemay contain an excessive amount of intricatedetail that may interest only a particular audience. Please help byspinning off orrelocating any relevant information, and removing excessive detail that may be againstWikipedia's inclusion policy.(December 2024) (Learn how and when to remove this message)
(Learn how and when to remove this message)
Advanced Package Tool
apt requesting confirmation before an installation
Developer(s)TheDebian Project
Initial release31 March 1998; 27 years ago (1998-03-31)[1]
Stable release
3.0.1[2] Edit this on Wikidata / 25 April 2025; 13 days ago (25 April 2025)
Repository
Written inC++,[3] shell script,[3] XML,[3] CMake,[3] C,[3] Perl[3] Edit this on Wikidata
Operating systemUnix-like
TypePackage manager
LicenseGPLv2+
Websitewiki.debian.org/AptCLI

Advanced Package Tool (APT) is afree-softwareuser interface that works withcore libraries to handle the installation and removal of software onDebian and Debian-basedLinux distributions.[4] APT simplifies the process of managing software onUnix-like computer systems by automating the retrieval, configuration and installation ofsoftware packages, either from precompiled files or bycompiling source code.[4]

Usage

[edit]

APT is a collection of tools distributed in a package namedapt. A significant part of APT is defined in aC++ library of functions; APT also includes command-line programs for dealing with packages, which use the library. Three such programs areapt,apt-get andapt-cache. They are commonly used in examples because they are simple and ubiquitous. Theapt package is of "important" priority in all current Debian releases, and is therefore included in a default Debian installation. APT can be considered afront end todpkg, friendlier than the olderdselect front end. Whiledpkg performs actions on individual packages, APT manages relations (especially dependencies) between them, as well as sourcing and management of higher-level versioning decisions (release tracking andversion pinning).

APT is often hailed as one of Debian's best features,[by whom?][5][6][7][8] which Debian developers attribute to the strict quality controls in Debian's policy.[9][10]

A major feature of APT is the way it callsdpkg — it doestopological sorting of the list of packages to be installed or removed and callsdpkg in the best possible sequence. In some cases, it utilizes the--force options ofdpkg. However, it only does this when it is unable to calculate how to avoid the reasondpkg requires the action to be forced.

Installing software

[edit]

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, notlibc6_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 ofdependency hell.

Another distinction is the retrieval of packages from remote repositories. APT uses a 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, theapt_preferences mechanism allows the user to create an alternative installation policy for individual packages.

The user can specify packages using a POSIXregular expression.

APT searches its cached list of packages and lists the dependencies that must be installed or updated.

APT retrieves, configures and installs the dependencies automatically.

Triggers are the treatment of deferred actions.

Update, upgrade and dist-upgrade

[edit]

Usage modes ofapt andapt-get that facilitate updating installed packages include:

  • update is used to resynchronize thepackage index files from their sources. The lists of available packages are fetched from the location(s) specified in/etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans thePackages.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 with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version.
  • full-upgrade (apt) anddist-upgrade (apt-get), in addition to performing the function ofupgrade, also intelligently handles changing dependencies with new versions of packages;apt andapt-get have a "smart" conflict resolution system, and 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.[4]aptitude has a smarterdist-upgrade feature calledfull-upgrade.[11]

Configuration and files

[edit]

/etc/apt contains the APT configuration folders and files.

apt-config is the APT Configuration Query program.[12]apt-config dump shows the configuration.[13]

Files

[edit]
  • /etc/apt/sources.list:[14] 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.d/: Directory with version preferences files. This is where "pinning" is specified, i.e. a 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 state information for each package resource specified insources.list
  • /var/lib/apt/lists/partial/: Storage area for state information in transit.

Sources

[edit]

APT relies on the concept ofrepositories 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 orCD-ROM location. As of 14 August 2021,[update] the Debian project keeps a central repository of over 50,000 software packages ready for download and installation.[15]

Any number of additional repositories can be added to APT'ssources.list configuration file (/etc/apt/sources.list) and then be queried by APT. Graphical front ends often allow modifyingsources.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, usingapt-cdrom[16] or addingfile:/ URI[17] to the source list file.apt-cdrom can specify a folder other 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. One can also useapt-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.

APT pinning

[edit]

TheAPT pinning feature allows users 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, thepins in APT'spreferences file (/etc/apt/preferences) must be modified,[18] although graphical front ends often make pinning simpler.

Front ends

[edit]
Synaptic Package Manager is one of the front ends available for APT.

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

  • Synaptic, aGTKgraphical user interface
  • Ubuntu Software Center, aGTKgraphical user interface developed by the Ubuntu project
  • aptitude, a console client withCLI andncurses-basedTUI interfaces
  • KPackage, part ofKDE
  • Adept package manager, a graphical user interface forKDE (deb, rpm, bsd)
  • PackageKit, aD-Bus frontend, maintained byfreedesktop.org, powersGNOME Software and KDE Discover.
  • GDebi, a GTK-based tool sponsored for Ubuntu. (There is also a Qt version, available in the Ubuntu repositories as gdebi-kde.)
  • apt-cdrom, a way to add a new CDROM to APT's list of available repositories (sources.lists). It is necessary to use apt-cdrom to add CDs to the APT system, it cannot be done by hand.
  • apt-zip, a way to use apt withremovable media, specificallyUSB flash drives.
  • aptURL, an Ubuntu software package that enables end-user applications to install with a single-click through a browser.[19][20]
  • Cydia, a package manager forjailbroken iOS based on APT (ported to iOS as part of the Telesphoreo project).[21][22]
  • Sileo, likeCydia, a package manager for jailbroken iOS based on newer versions of APT (ported to iOS by the Electra team)
  • gnome-apt, a GTK/GNOME-widget-based graphical front end. Developed byHavoc Pennington[23]
  • Muon discover (previous Muon software center), a Qt-based graphical user interface
  • Hildon application manager (Maemo application), aMaemo front end
  • apticron, a service designed to be run viacron to email notices of pending updates to a system administrator (sysadmin).
  • APT Daemon, a front end that runs as aservice to allow users to install software throughPolicyKit and is in turn the framework used byUbuntu software center (along with theLinux Mint software manager).
  • Package installer, part of MX Linux.
  • Apt-offline: A convenient way to make any available non-containerized change to any Debian-type Linux installation without using a direct Internet connection. However, a temporary direct connection can be required, such as to install Apt-offline on some of the relevant types of Linux, and to addPPA's to the sources-list.

APT front ends can:

  • search for new packages;
  • upgrade packages;
  • install or remove packages and
  • upgrade the whole system to a new release.

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.

History

[edit]

The original effort that led to theapt-get program was thedselect replacement project known by its codenameDeity.[24] This project was commissioned in 1997 by Brian White, the Debian release manager at the time. The first functional version ofapt-get was calleddpkg-get and was only intended to be a test program for the core library functions that would underpin the new user interface (UI).[25]

Much of the original development of APT was done onInternet relay chat (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.[26]

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

In the end the original goal of the Deity project of replacing thedselect user interface was a failure. Work on the user interface portion of the project was abandoned (the user interface directories were removed from theconcurrent versions system) after the first public release ofapt-get. The response to APT as adselect 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 user interfaces on top oflibapt-pkg.

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 strongcryptographicsigning to authenticate the package repositories.[28]

Variants

[edit]

APT was originally designed as a front end fordpkg to work with Debian's.deb packages. A version of APT modified to also work with theRPM Package Manager system was released asAPT-RPM.[29] TheFink project has ported APT toMac OS X for some of its own package management tasks,[30] and APT is also available inOpenSolaris.

apt-file

[edit]

apt-file is a command, packaged separately from APT, to find which package includes a specific file, or to list all files included in a package on remote repositories.[31]

See also

[edit]

References

[edit]
  1. ^"Initial release".apt package changelog. The Debian project. 31 March 1998. Retrieved18 December 2021.
  2. ^"3.0.1". 25 April 2025. Retrieved27 April 2025.
  3. ^abcdef"The apt - Advanced Package Tool Open Source Project on Open Hub: Languages Page".Open Hub. Retrieved2 May 2024.
  4. ^abc"apt-get(8)".Debian Manpages. Retrieved18 December 2021.
  5. ^Byfield, Bruce (9 December 2004)."An apt-get primer". Retrieved18 December 2021.
  6. ^"From the archives: the best distros of 2000". Tux radar. Archived fromthe original on 26 July 2020.
  7. ^Dorgan, David (19 January 2004)."Migrating to Debian". linux.ie. Archived fromthe original on 13 May 2006.
  8. ^"Mobile Linux development with Familiar and a minimal Debian". Mobile Tux. Archived fromthe original on 15 September 2008.
  9. ^"Why Debian". Retrieved18 December 2021.
  10. ^"Debian policy manual". Retrieved18 December 2021.
  11. ^"Discussion on dist-upgrade vs. full-upgrade". Retrieved18 December 2021.
  12. ^"apt-config(8)".Debian Manpages. Retrieved18 December 2021.
  13. ^"Query APT configuration using apt-config - Debian admin". 2 December 2006. Retrieved18 December 2021.
  14. ^"SourcesList".Debian Wiki. Retrieved18 December 2021.
  15. ^"Debian 11 "bullseye" released".www.debian.org. Retrieved2022-05-11.
  16. ^"apt-cdrom(8)".Debian Manpages. Retrieved27 December 2021.
  17. ^e.g. deb file:/mnt/install stable main contrib non-free.{{citation}}: CS1 maint: postscript (link)
  18. ^"AptConfiguration". Debian Wiki. Retrieved2020-05-18.
  19. ^"AptURL".Ubuntu Wiki. Retrieved27 December 2021.
  20. ^"How to install software in Ubuntu Linux: A complete guide for newbie". 17 June 2018. Retrieved27 December 2021.
  21. ^Jurick, David (2009).iPhone hacks: Pushing the iPhone and iPod touch beyond their limits. O'Reilly Media, Inc. p. 20.ISBN 9780596516642. Retrieved27 December 2021.
  22. ^Adhikari, Richard (20 March 2008)."Android, Schmandroid: Linux on the iPhone". LinuxInsider. Retrieved27 December 2021.
  23. ^Mullikin, Glenn (December 2001)."The evolution of Debian package management systems".AUUGN. Vol. 22, no. 4. p. 50.ISSN 1035-7521.gnome-apt was written by Havoc Pennington
  24. ^White, Brian C. (11 April 1997).""dselect" replacement project ("deity")".deity@lists.debian.org (Mailing list).
  25. ^Gunthorpe, Jason (2 March 1998)."It's working".deity@lists.debian.org (Mailing list).
  26. ^Gunthorpe, Jason (19 March 1998)."Re: 2 things (!)".deity@lists.debian.org (Mailing list).
  27. ^"A brief history of Debian". debian.org. Archived fromthe original on 24 August 2003.
  28. ^"Secure APT". Debian Wiki. Retrieved27 December 2021.
  29. ^"APT-RPM". apt-rpm.org.Archived from the original on 21 April 2008. Retrieved27 December 2021.
  30. ^"Fink - About". www.finkproject.org.Archived from the original on 11 May 2008. Retrieved27 December 2021.
  31. ^"Inspecting and extracting Debian package contents".Packagecloud blog. 13 October 2015. Retrieved27 December 2021.

External links

[edit]
General
Debian OpenLogo
People
Derivatives
Kernels
Forks
Software
Others
Gaming console
Linux
Unix-like
dpkg
Purely functional
RPM
tarball
Other
macOS
z/OS
Mobile OS
Multi-platform
Solarisillumos
Web browsers
Windows
BSD
C++
Java
JavaScript
Kubernetes
Linux
macOS
.NET
Perl
PHP
Python
Ruby
Rust
Scala
Retrieved from "https://en.wikipedia.org/w/index.php?title=APT_(software)&oldid=1285330029"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp