Advanced Package Tool (APT)

APT is a tool that provides a high-level command line interface for management of software packages on Debian-based Linux systems. Packages are used to install and maintain new software. In this article I will be explaining some of the apt commands. The general syntax for apt is apt [command].

apt update

update is used to download package information from all of the configured sources. Other commands operate on this data to upgrade packages or to search in and display details about packages that are available for installation.

apt upgrade

upgrade is used to install available upgrades of all packages currently installed on the system from the sources configured via the sources list. New packages will be installed only if they are required to satisfy any dependencies, existing packages will never be removed. If an upgrade for a package requires the removal of an installed package, the upgrade for this package is not performed at all.

apt full-upgrade

full-upgrade is used to perform the same function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.

apt install, reinstall, remove, purge

Used to perform an action on one or more specified packages. A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select. Alternatively the version specific release can be selected by following the package name with a forward slash (/) and codename (buster) or suite name (stable, testing, unstable). Depenencies will be automatically selected to satisfy the request.

Removing a package removes all packaged data, but leaves usally small user configuration files behind. This helps in the case of accidental removal, as issuing an install command should restore functionality.

To get rit of everything the purge command can be used, it will not change any data or configuration that is stored in a user’s home directory.

apt autoremove

Used to perform automatic removal of packages that are no longer needed as dependencies changed, or the packages that originally used them no longer make use of them.

satisfy

Used to satisfy dependency strings, additionally it handles conflicts. (extra steps needed to handle conflicts)

apt edit-sources

Used to edit source list files in a text editor while also providing the ability to verify sources for your sources.

Even the apt team recommends nano instead of vim.

My source: (man apt)

Subscribe Today


Posted

in

,

by

Tags: