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 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. | ||
− | Main Advanced Package Tool (APT) binaries are: <code>apt</code>, <code>[[apt-get]]</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> | + | * <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> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Basic [[apt-cache]] commands == | == Basic [[apt-cache]] commands == | ||
Line 21: | Line 15: | ||
== 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> | + | * <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> | + | ** <code>apt list --upgradable</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 && | + | ** <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]] | ||
− | |||
=== Holding packages === | === Holding packages === | ||
− | To avoid packages from being upgrade when upgrading use <code> | + | 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 40: | ||
# 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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See Also == | == See Also == | ||
− | * {{ | + | * {{package managers}} |
* {{apt}} | * {{apt}} | ||
− | |||
{{CC license}} | {{CC license}} | ||
Line 68: | Line 51: | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:APT]] | [[Category:APT]] | ||
− |
Advertising: