Difference between revisions of "APT"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
 
Main Advanced Package Tool (APT) binaries are: <code>apt</code>, <code>[[apt-get]]</code>, <code>[[apt-cache]]</code> and <code>[[apt-key]]</code>
 
Main Advanced Package Tool (APT) binaries are: <code>apt</code>, <code>[[apt-get]]</code>, <code>[[apt-cache]]</code> and <code>[[apt-key]]</code>
  
== Basic apt-get/apt commands ==
+
== Basic apt commands ==
 
* Installing: <code>apt install PACKAGE_NAME</code>
 
* Installing: <code>apt install PACKAGE_NAME</code>
 
* <code>[[apt show]] PACKAGE_NAME</code> or <code>aptitude show PACKAGE_NAME</code>
 
* <code>[[apt show]] PACKAGE_NAME</code> or <code>aptitude show PACKAGE_NAME</code>
Line 13: Line 13:
 
* <code>[[apt autoremove]]</code>
 
* <code>[[apt autoremove]]</code>
 
* <code>[[apt clean]]</code>
 
* <code>[[apt clean]]</code>
 +
* <code>[[apt-file list]]</code>
  
 
== Basic [[apt-cache]] commands ==
 
== Basic [[apt-cache]] commands ==

Revision as of 16:38, 17 February 2020

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 Debian, Ubuntu and other Linux distributions. Main Advanced Package Tool (APT) binaries are: apt, apt-get, apt-cache and apt-key

Basic apt commands

Basic apt-cache commands

See also: apt show PACKAGE_NAMEdpkg -s PACKAGE_NAME

Relevant configuration files and directories

  • /etc/apt/sources.list[3]: Configuration files with locations to fetch packages from.
  • /etc/apt/sources.list.d/: directory with additional source list fragments.

Updates

Holding packages

To avoid packages from being upgrade when upgrading use apt-mark command

  • apt-mark hold PACKAGE_NAME
  • apt-mark unhold PACKAGE_NAME
  • apt-mark showhold[4]

Single upgrade

  • To upgrade only a package: apt-get install --only-upgrade PACKAGE_NAME

Activities

  1. Read differences between apt upgrade and apt dist-upgrade: https://unix.stackexchange.com/a/304887
  2. Read APT Automatic updates
  3. Install software-properties-common package[5] to be able to use apt-add-repository Python command available since 2004.

See Also

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Original Source: https://en.wikiversity.org/wiki/Linux_server_administration/apt

Advertising: