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 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 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>
Line 12: Line 12:
 
* <code>[[apt install]]</code>
 
* <code>[[apt install]]</code>
 
* <code>[[apt autoremove]]</code>
 
* <code>[[apt autoremove]]</code>
* <code>[[apt clean]] PACKAGE_NAME</code>  
+
* <code>[[apt clean]]</code>
* <code>[[apt-file]] list</code> (<code>apt install apt-file</code>)
 
* [[apt list]]
 
  
 
== Basic [[apt-cache]] commands ==
 
== Basic [[apt-cache]] commands ==
Line 21: Line 19:
 
== 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>
Line 48: Line 44:
 
# Read [[APT Automatic updates]]
 
# Read [[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}}
+
* {{package managers}}
 
* {{apt}}
 
* {{apt}}
* {{package managers}}
 
  
 
{{CC license}}
 
{{CC license}}
Line 68: Line 55:
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:APT]]
 
[[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: