Advanced Package Tool

From 6bit.ch wiki
Revision as of 17:16, 25 November 2022 by Xbl (talk | contribs)
Jump to navigation Jump to search

apt

Updates and upgrades installed software. Uses dpkg to install and uninstall.
Repos are defined in /etc/apt/sources.list, usually non-free repos are disabled by default.

Use

apt update check for updates
apt upgrade install updates
apt dist-upgrade install updates and new dependencies, remove old versions

apt list --installed list installed packages
apt-cache search <package> search repositories for $package
apt-cache show <package> show details for $package

apt install <package> install $package
apt remove<package> uninstall $package, keep configuration
apt purge<package> uninstall $package, remove configuration
apt autoremove remove old kernels from /boot (leaves current and latest), remove unused dependencies

Useful Flags

-y / --yes / --assume-yesanswers yes to all questions, use with caution
-s / --simulate / --just-print / --no-act / --dry-run / --recon show what is going to happen, but do nothing