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]] | + | * <code>[[apt clean]]</code> |
− | |||
− | |||
== 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> | + | * <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 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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See Also == | == See Also == | ||
− | * {{ | + | * {{package managers}} |
* {{apt}} | * {{apt}} | ||
− | |||
{{CC license}} | {{CC license}} | ||
Line 68: | Line 55: | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:APT]] | [[Category:APT]] | ||
− |
Advertising: