Advanced Package Tool, or 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:
Basic apt commands
apt install PACKAGE_NAME
apt show PACKAGE_NAMEor
aptitude show PACKAGE_NAME
apt policy PACKAGE_NAME Provides source repository for a given package.
apt-get update && apt-get upgrade
- Showing pending to update packages:
apt-get upgrade --dry-runor
apt-get upgrade -s
apt clean PACKAGE_NAME
apt install apt-file)
apt-cache policy List source repository configured included priorities of each source.
apt-cache showpkg PACKAGE_NAME(includes package dependencies)
apt-cache show PACKAGE_NAME
apt-cache depends PACKAGE_NAME
apt-cache rdepends PACKAGE_NAME
apt changelog PACKAGE_NAME
Relevant configuration files and directories
- /etc/apt/sources.list: Configuration files with locations to fetch packages from.
- /etc/apt/sources.list.d/: directory with additional source list fragments.
- To collect information about what installed packages can be upgraded:
- To upgrade all installed packages:
apt dist-upgrade(see also
- APT Automatic updates
To avoid packages from being upgrade when upgrading use
- To upgrade only a package:
apt-get install --only-upgrade PACKAGE_NAME
- Read differences between
apt dist-upgrade: https://unix.stackexchange.com/a/304887
- Read APT Automatic updates
software-properties-commonpackage to be able to use
apt-add-repositoryPython command available since 2004.
- Package managers: dpkg, APT, RPM, YUM, DNF, homebrew, pkgutil, opkg, Helm, pkg and snap, npm, Aptitude, alien, Conan, CRAN, Chocolatey, NuGet, PackageKit, Wajig
sources.list, APT Automatic updates
Original Source: https://en.wikiversity.org/wiki/Linux_server_administration/apt