Debian Based Distros
APT (Advanced Package Tool) - High Level
Source repos config files: /etc/apt/sources.list
# versionCodeName examples: jammy jammy-security (for security updates only)
# packageGroup example: main
deb http://source/ versionCodeName packageGroup
apt updateGo to sources list and update packages version cache file (/var/cache/pkgcache).
apt upgradeUpgrade Packages with new versions from the cache.
apt dist-upgradeStronger upgrade (some packages are told by the maintainer to not upgrade just with upgrade).
apt-mark hold myPackageDo not update this package when doing upgrade.
apt search myStringSearch package with myString in the name.
apt info myPackageGive infos about a package (Version, Origin, Maintainer).
apt remove myPackageRemove myPackage (only the package).
apt install myPackageInstall myPackage (check in the cache file).
apt install -s myPackageSimulate installation.
apt install -f myPackageFix Broken (install missing dependencies).
apt download myPackageDownload the deb file myPackage without installing.
apt remove myPackageRemove myPackage (only the package).
apt autoremove myPackageRemove myPackage and dependencies.
apt autoremove --purge myPackageRemove myPackage, dependencies and config files with purge.
DPKG – Low Level
dpkg -lShow installed packages.
dpkg -i myPackage.debInstall package.
dpkg-reconfigure myPackageRe-run installation configuration scripts.
RedHat Based Distros
DNF (Dandified YUM) - High Level
DNF is the modern replacement for YUM (faster and memory efficient). Sub-commands are the same as YUM.
YUM (Yellowdog Updater Modified) – High Level
Main config file: /etc/yum.conf Source repos config file: /etc/yum.repos.d/
yum updateUpdate repositories and packages.
yum upgradeUpgrade packages and remove obsolete ones.
yum search myStringSearch package with myString in the name.
yum install myPackageInstall a package.
RPM (Red Hat PackMan) – Low Level
rpm query myStringSearch package with myString in the name.
rpm -U myFile.rpmInstall or Upgrade a package.
rpm -i myFile.rpmInstall a package.
rpm -i -v -h myFile.rpmInstall a package with verbose and loadfing bar.
