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 update
Go to sources list and update packages version cache file (/var/cache/pkgcache).apt upgrade
Upgrade Packages with new versions from the cache.apt dist-upgrade
Stronger upgrade (some packages are told by the maintainer to not upgrade just with upgrade).apt-mark hold myPackage
Do not update this package when doing upgrade.
apt search myString
Search package with myString in the name.apt info myPackage
Give infos about a package (Version, Origin, Maintainer).
apt remove myPackage
Remove myPackage (only the package).
apt install myPackage
Install myPackage (check in the cache file).apt install -s myPackage
Simulate installation.apt install -f myPackage
Fix Broken (install missing dependencies).
apt download myPackage
Download the deb file myPackage without installing.
apt remove myPackage
Remove myPackage (only the package).apt autoremove myPackage
Remove myPackage and dependencies.apt autoremove --purge myPackage
Remove myPackage, dependencies and config files with purge.
DPKG – Low Level
dpkg -l
Show installed packages.
dpkg -i myPackage.deb
Install package.
dpkg-reconfigure myPackage
Re-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 update
Update repositories and packages.yum upgrade
Upgrade packages and remove obsolete ones.
yum search myString
Search package with myString in the name.
yum install myPackage
Install a package.
RPM (Red Hat PackMan) – Low Level
rpm query myString
Search package with myString in the name.
rpm -U myFile.rpm
Install or Upgrade a package.rpm -i myFile.rpm
Install a package.rpm -i -v -h myFile.rpm
Install a package with verbose and loadfing bar.
