Package managers
Linux Command Line Quick Reference
1 min read
Published Aug 18 2026
Guide Sections
Guide Comments
Ubuntu uses APT to install and update software from configured repositories. apt is intended for interactive administration; apt-get is commonly used where a more stable scripting interface is wanted.
Manage packages with APT
sudo apt updatesudo apt upgradesudo apt full-upgradesudo apt install nginxsudo apt remove nginxsudo apt purge nginxsudo apt autoremoveapt search nginxapt show nginxapt list --installedapt update downloads current package indexes but does not upgrade installed software. apt upgrade installs available upgrades without removing installed packages to satisfy dependencies. full-upgrade may remove packages when necessary to complete an upgrade.
remove uninstalls a package while normally leaving its configuration files. purge removes the package and package-managed configuration. autoremove removes dependencies that APT believes are no longer required.
For package files already downloaded:
Inspect Debian packages
sudo apt install ./package.debdpkg -ldpkg -L package-namedpkg -S /path/to/fileapt-cache policy package-nameInstalling a local .deb with apt is usually preferable to dpkg -i because APT can resolve dependencies. dpkg -L lists files installed by a package and dpkg -S identifies which installed package owns a path. apt-cache policy shows installed and candidate versions and their repository sources.
Other Linux distributions use different package managers, including dnf on Fedora and RHEL-family systems, pacman on Arch Linux and zypper on openSUSE.