A listing of equivalent package management commands using Debian (deb), Redhat/Fedora (rpm/yum/dnf), and ArchLinux (pacman).
Search For a Package
deb$ apt-cache search <name>
rhel$ yum search <name>
fedora$ dnf search <name>
arch$ pacman -Ss <name>
Repo List
List the current repos:
deb$ cat /etc/apt/sources.list
rhel$ cat /etc/yum.repos.d/*
fedora$ dnf repolist
arch$ /etc/pacman.d/mirrorlist
Enabling a repo temporarily:
rhel$ yum --enablerepo=rpmforge --enablerepo=epel --enablerepo=atomic <cmd>
Managing repo list:
deb$ $EDITOR /etc/apt/sources.list /etc/apt/sources.d/*
rhel$ $EDITOR /etc/yum.repos.d/*
# To enable a yum repo set enabled=1
fedora$ dnf config-manager --set-enabled updates-testing
fedora$ dnf config-manager --set-disabled updates-testing
Install a Package
deb$ apt-get install <name>
rhel$ yum install <name>
fedora$ dnf install <name>
arch$ pacman -S <name>
Install a Local Package
deb$ dpkg -i <package>.deb
rhel$ rpm -i <package>.rpm
fedora$ (same as rpm)
arch$ ???
Remove a Package
deb$ apt-get purge <name>
rhel$ rpm -e <package>
rhel$ yum remove <package>
fedora$ dnf remove <package>
arch$ pacman -R <name>
List Files Provided by a Package
deb$ dpkg -L <name>
rhel$ rpm -ql <name>
fedora$ (same as rpm)
arch$ pacman -Ql <name>
Status of Packages
deb$ dpkg -l <name>
rhel$ ???
fedora$ ???
arch$ ???
Find Package That Provides a File
deb$ dpkg --search <file>
rhel$ ???
arch$ pacman -Qo </file/path>
List Installed Packages
deb$ dpkg -l [<name>]
rhel$ yum list [<name>]
arch$ pacman -Qqen
Get/Set Installed Packages
deb$ dpkg --get-selections > pkglist.txt
deb$ dpkg --set-selections < pkglist.txt
arch$ pacman -Qqen > pkglist.txt
arch$ pacman -S $(< pkglist.txt)
Show Information About a Package
deb$ apt-cache show <name>
rhel$ yum info <name>
arch$ pacman -Si <name>
Update Package List
deb$ apt-get update
rhel$ yum check-update
fedora$ dnf update
arch$ pacman -Sy
Upgrade Packages
deb$ apt-get upgrade
rhel$ yum update
fedora$ dnf upgrade
arch$ pacman -Su
Changelog
deb$ ???
rhel$ ???
arch$ /var/log/pacman.log
Manage Package Signing Keys
fedora$ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-29-x86_64
fedora$ rpm -q gpg-pubkey
gpg-pubkey-9db62fb1-59920156
gpg-pubkey-429476b4-5a886537
fedora$ rpm -e gpg-pubkey-9db62fb1-59920156
Package Cache
deb$ ls /var/cache/apt/archives
deb$ apt-get clean
fedora$ ls /var/cache/dnf/*/packages/
fedora$ dnf clean all
arch$ ls /var/cache/pacman/pkg
arch$ pacman -Sc