Difference between revisions of "Advanced Package Tool"

From 6bit.ch wiki
Jump to navigation Jump to search
(Created page with " = apt = Updates and upgrades installed software. Uses dpkg to install and uninstall.</br> Repos are defined in <code>/etc/apt/sources.list</code>, usually non-free repos are disabled by default.</br> == Use == <code>apt update</code> check for updates</br> <code>apt upgrade</code> install updates</br> <code>apt dist-upgrade</code> install updates and new dependencies, remove old versions</br> </br> <code>apt list --installed </code> list installed packages</br> <code>...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= apt =
= apt =


Line 20: Line 19:


== Useful Flags ==
== Useful Flags ==
<code>-y / --yes / --assume-yes</code>answers yes to all questions, use with caution</br>
<code>-y / --yes / --assume-yes</code> answers yes to all questions, use with caution</br>
<code>-s / --simulate / --just-print / --no-act / --dry-run / --recon</code> show what is going to happen, but do nothing</br>
<code>-s / --simulate / --just-print / --no-act / --dry-run / --recon</code> show what is going to happen, but do nothing</br>

Latest revision as of 17:27, 25 November 2022

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-yes answers 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