APT (Advanced Package Tool) is a package manager for Linux systems, specifically for systems that use the DEB (Debian) package format. It is commonly used on Debian, Ubuntu, and other Debian-based distributions.
APT is a command-line tool that allows users to install, update, and remove software packages on their system. It also has the ability to manage software sources, search for packages, and check for updates. Like yum, it automatically resolves dependencies, which means that if a package depends on another package to run, APT will automatically install that package as well. This makes it easy for users to install and manage software on their systems.
APT is designed to work with a central repository of software packages, which makes it easy to install new software and keep it updated. It also has the ability to install software from other repositories, which can be useful for installing software that is not included in the official repositories. The package management tool apt-get
and apt-cache
are also part of apt, which are used to manage packages.
APT is a powerful and flexible tool that is widely used by Linux system administrators and users to manage software on their systems.
Here are some commonly used APT commands and their examples for Debian and Ubuntu distributions:
apt update
– updates the package list from the repositoriesapt upgrade
– upgrades all installed packages to their latest versionapt install [package name]
– installs a specific package on the systemapt remove [package name]
– removes a specific package from the systemapt search [keyword]
– searches for packages containing a specific keywordapt list --installed
– lists all installed packages on the systemapt autoremove
– removes packages that were installed as dependencies but are no longer neededapt full-upgrade
– upgrades the system to a new releaseapt show [package name]
– shows detailed information about a specific packageapt policy [package name]
– shows the priority of a package from different sources
Examples:
apt install nano
– installs the nano text editorapt remove apache2
– removes the Apache web server packagea
pt search php
– searches for packages containing the keyword “php”apt show nano
– shows detailed information about the nano packageapt upgrade --dry-run
– dry run an upgrade command
Please note that APT commands must be run as root or with superuser privileges.