Editing APT

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Advanced [[Package manager|Package Tool]], or [[Wikipedia:APT (Debian)|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.
+
Advanced Package Tool, or [[Wikipedia:APT (Debian)|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: <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> and <code>apt-cache</code>
  
== Basic apt commands ==
+
== Basic apt-get/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>
* <code>[[apt policy]] PACKAGE_NAME</code> <ref>https://askubuntu.com/a/347805/897490</ref> Provides source repository for a given package.
+
* <code>apt policy PACKAGE_NAME</code> <ref>https://askubuntu.com/a/347805/897490</ref> Provides source repository for a given package.
* <code>[[apt-get]] update && apt-get upgrade</code>
+
* <code>apt-get update && apt-get upgrade</code>
 
* Showing pending to update packages: <code>apt-get upgrade --dry-run</code> or <code>apt-get upgrade -s</code>
 
* Showing pending to update packages: <code>apt-get upgrade --dry-run</code> or <code>apt-get upgrade -s</code>
 
** <code>/usr/lib/update-notifier/apt-check --human-readable</code>
 
** <code>/usr/lib/update-notifier/apt-check --human-readable</code>
* <code>[[apt purge]]</code>
 
* <code>[[apt install]]</code>
 
* <code>[[apt autoremove]]</code>
 
* <code>[[apt clean]] PACKAGE_NAME</code>
 
* <code>[[apt-file]] list</code> (<code>apt install apt-file</code>)
 
* [[apt list]]
 
  
 
== Basic [[apt-cache]] commands ==
 
== Basic [[apt-cache]] commands ==
Line 20: Line 14:
  
 
== Relevant configuration files and directories ==
 
== Relevant configuration files and directories ==
* <kbd>/etc/apt/[[sources.list]]</kbd><ref>https://wiki.debian.org/SourcesList</ref>: Configuration files with locations to fetch packages from.
+
* <kbd>/etc/apt/sources.list</kbd><ref>https://wiki.debian.org/SourcesList</ref>: Configuration files with locations to fetch packages from.
* <kbd>[[/etc/apt/sources.list.d/]]</kbd>: directory with additional source list fragments.
+
* <kbd>/etc/apt/sources.list.d/</kbd>: directory with additional source list fragments.
  
 
== Updates ==
 
== Updates ==
 
* To collect information about what installed packages can be upgraded:  
 
* To collect information about what installed packages can be upgraded:  
 
** <code>[[apt update]]</code>
 
** <code>[[apt update]]</code>
** <code>[[apt list --upgradable]]</code>
+
** <code>apt list --upgradable</code>
** <code>[[apt list updated]]</code>
 
 
** <code>apt-get upgrade --dry-run</code> or <code>apt-get upgrade -s</code>
 
** <code>apt-get upgrade --dry-run</code> or <code>apt-get upgrade -s</code>
** <code>apt update && [[apt upgrade]]</code>
+
** <code>apt update && apt upgrade</code>
 
* To upgrade all installed packages: <code>apt upgrade</code>
 
* To upgrade all installed packages: <code>apt upgrade</code>
* <code>apt dist-upgrade</code> (see also <code>[[do-release-upgrade]]</code>)
+
* <code>apt dist-upgrade</code> (see also <code>[[/do-release-upgrade/]]</code>)
* [[APT Automatic updates]]
+
* apt [[/Automatic updates/]]
* <code>[[apt full-upgrade]]</code>
 
  
 
=== Holding packages ===
 
=== Holding packages ===
To avoid packages from being upgrade when upgrading use <code>[[apt-mark]]</code> command
+
To avoid packages from being upgrade when upgrading use <code>apt-mark</code> command
* <code>[[apt-mark]] hold PACKAGE_NAME</code>
+
* <code>apt-mark hold PACKAGE_NAME</code>
 
* <code>apt-mark unhold PACKAGE_NAME</code>
 
* <code>apt-mark unhold PACKAGE_NAME</code>
 
* <code>apt-mark showhold</code><ref>https://askubuntu.com/questions/640986/how-to-get-a-list-of-installed-packages-held-back-from-upgrade</ref>
 
* <code>apt-mark showhold</code><ref>https://askubuntu.com/questions/640986/how-to-get-a-list-of-installed-packages-held-back-from-upgrade</ref>
Line 46: Line 38:
 
== Activities ==
 
== Activities ==
 
# Read differences between <code>apt upgrade</code> and <code>apt dist-upgrade</code>: https://unix.stackexchange.com/a/304887
 
# Read differences between <code>apt upgrade</code> and <code>apt dist-upgrade</code>: https://unix.stackexchange.com/a/304887
# Read [[APT Automatic updates]]
+
# Read [[Linux server administration/apt/Automatic updates]]
 
# Install <code>software-properties-common</code> package<ref> https://packages.debian.org/sid/admin/software-properties-common</ref> to be able to use <code>[[apt-add-repository]]</code> Python command available since 2004.
 
# Install <code>software-properties-common</code> package<ref> https://packages.debian.org/sid/admin/software-properties-common</ref> to be able to use <code>[[apt-add-repository]]</code> Python command available since 2004.
 
 
== Related terms ==
 
* <code>[[lsb_release]]</code>
 
* [[Ansible apt module]]
 
* <code>[[/etc/apt/apt.conf.d/90forceyes]]</code>
 
* <code>[[rm -rf]] [[/var/lib/apt/lists/]]*</code>
 
* <code>[[apt-get source]]</code>
 
  
 
== See Also ==
 
== See Also ==
* {{dpkg}}
+
* [[dpkg]], [[dnf]] and [[snap]]
 +
* [[wikipedia:Deb_(file_format)]] to understand ''.deb'' internal format an included files: ''preinst, postinst, prerm and postrm.''
 +
* [[RPM]] (Linux)
 +
* [[pkgutil]] ([[MacOS]])
 +
* [[brew]] ([[MacOS]]), command of the [[Homebrew]] package management software [[wikipedia:Homebrew (package management software)]]
 +
* [[pkg]] ([[FreeBSD]])
 +
* [[wikipedia:apt-file]] to view the contents of [[Debian]] packages on remote repositories
 +
* [[opkg]]
 +
* [[Package manager]]
 
* {{apt}}
 
* {{apt}}
* {{package managers}}
 
  
 
{{CC license}}
 
{{CC license}}
Line 66: Line 57:
  
 
[[Category:Server administration]]
 
[[Category:Server administration]]
 +
[[Category:Operating systems]]
 
[[Category:Linux]]
 
[[Category:Linux]]
[[Category:APT]]
 
[[Category:Package managers]]
 

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: