APT

From wikieduonline
Revision as of 22:42, 28 August 2022 by Ant (talk | contribs) (→‎See Also)
Jump to navigation Jump to search

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

  • Installing: apt install PACKAGE_NAME
  • apt show PACKAGE_NAME or aptitude show PACKAGE_NAME
  • apt policy PACKAGE_NAME [1] Provides source repository for a given package.
  • apt-get update && apt-get upgrade
  • Showing pending to update packages: apt-get upgrade --dry-run or apt-get upgrade -s
    • /usr/lib/update-notifier/apt-check --human-readable
  • apt purge
  • apt install
  • apt autoremove
  • apt clean PACKAGE_NAME
  • apt-file list (apt install apt-file)
  • apt list

Basic apt-cache commands

See also: apt show PACKAGE_NAMEdpkg -s PACKAGE_NAME

Relevant configuration files and directories

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.


Related terms

See Also

Advertising: