Docu review done: Tue 17 Oct 2023 10:53:15 AM CEST
Commands Descriptions
apt install [packagename]=[versoin]
installs package in given version
apt download [packagename]
downloads only the deb file
apt changelog [packagename]
shows changelog for package
apt --with-new-pkgs upgrade [packagenames]
upgrade held back packages by installing new dependencies
Commands Descriptions
apt-cache showpkg [packagename]
shows dependencies in details
apt-cache stats
shows local cache information
apt-cache policy
lists repositories and there priorities as well as pined packages
apt-cache policy [packagename]
shows priorities for given package only (for all package versions)
apt-cache rdepends [packagename]
lists reverse dependencies for package
apt-cache rdepends [packagename] --installed
same as above + only installed packages
apt-cache rdepends [packagename] --installed --no-recommends --no-suggests
same as above + no recommends and no suggests
Commands Descriptions
apt-get check [packagename]
generates dependency tree, shows broken dependencies
apt-get --no-install-recommends [packagename]
Does not treat recommended packages for installation
apt-get --install-suggests [packagename]
Treats suggested packages as dependencies
Commands Descriptions
hold [packagename]
holds package to current installed version
unhold [packagename]
removes hold on package
showhold
lists all packages with have the hold mark set
Commands Descriptions
apt-key
interact with gpg keys
apt-key export <keyid>
| gpg --dearmour -o /etc/apt/trusted.gpg.d/<name of project/tyeam/...>.gpg
Exports and creates .gpg
file for keys stored in trusted.db
Commands Descriptions
apt-show-versions
parses the dpkg status file and the APT lists for the installed and available package versions and distribution and shows upgrade options within the specific distribution of the selected package
`apt-show-versions [-i –initialize]`
`apt-show-versions [-u –upgradable]`
`apt-show-versions [-p –package] [package-name] [-a
`apt-show-versions [-r –regex] [regex]`
`apt-show-versions [-R –regex-all] [regex]`
To disable recommendations (not recommended) you can add the following line to your apt config:
APT::Install-Recommends "false";
To disable suggestions (might consider it, but think about it first) you can add the following line to your apt config:
APT::Install-Suggests "false";
If you do not want to get packages all the time autoremoved (without your interaction) you can use this config lines inside your apt.conf
:
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";
This will disable the autoremove and hides it also from your apt
execution.
Keep in mind, that you have to take care of that then on your own! To keep your system clean and small
Directory Description
/var/cache/apt
package cache
/var/lib/apt/lists
contains (In)Release/Package from all apt sources
Commands Descriptions
ar vr [file.deb]
Extracts content of Debian package