Search for package(s) by searching the expression in name, description, short description. What exact fields are being searched by default varies in each tool. Mostly options bring tools on par.

pacman -Ss

dnf search

apt search

zypper searchzypper se [-s]

emerge -S

Upgrade Packages - Install packages which have an older version already installed

pacman -Syu

dnf upgrade

apt update && apt upgrade

zypper update zypper up

emerge -u world

Upgrade Packages - Another form of the update command, which can perform more complex updates -- like distribution upgrades. When the usual update command will omit package updates, which include changes in dependencies, this command can perform those updates.

pacman -Syu

dnf distro-sync

apt update && apt dist-upgrade

zypper dup

emerge -uDN world

Clean up all local caches. Options might limit what is actually cleaned. Autoclean removes only unneeded, obsolete information.

pacman -Scpacman -Scc

dnf clean all

apt autocleanapt clean

zypper clean

eclean distfiles

Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.

pacman -Qdtq | pacman -Rs -

dnf autoremove

apt autoremove

zypper rm -u

emerge --depclean

Remove packages no longer included in any repositories.

pacman -Qmq | pacman -Rs -

dnf repoquery --extras

aptitude purge '~o'

Mark a package previously installed as a dependency as explicitly required.

pacman -D --asexplicit

dnf mark install

apt-mark manual

emerge --select

Install package(s) as dependency / without marking as explicitly required.

pacman -S --asdeps

dnf install => dnf mark remove

apt-mark auto

emerge -1

Only downloads the given package(s) without unpacking or installing them

Get a dump of the whole system information - Prints, Saves or similar the current state of the package management system. Preferred output is text or XML. (Note: Why either-or here? No tool offers the option to choose the output format.)

(see /var/lib/pacman/local)

(see /var/lib/rpm/Packages)

apt-cache stats

n/a

emerge --info

e-mail delivery of package changes

apt install apt-listchanges

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SUSE/openSUSE

Gentoo

Querying specific packages

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SLES/openSUSE

Gentoo

Show all or most information about a package. The tools' verbosity for the default command vary. But with options, the tools are on par with each other.

List the files that the package holds. Again, this functionality can be mimicked by other more complex commands.

pacman -Ql pacman -Fl

dnf repoquery -l

dpkg-query -L

rpm -ql

equery files

Displays packages which provide the given exp. aka reverse provides. Mainly a shortcut to search a specific field. Other tools might offer this functionality through the search command.

pacman -Fo

dnf provides

apt-file search

zypper what-provides zypper wp

equery belongs (only installed packages); pfl

Search all packages to find the one which holds the specified file. auto-apt is using this functionality.

pacman -Fs

dnf provides

apt-file search

zypper search -f

equery belongs

Show the changelog of a package

pacman -Qc

rpm -q --changelog

apt-get changelog

rpm -q --changelog

equery changes -f

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SUSE/openSUSE

Gentoo

Querying package lists

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SLES/openSUSE

Gentoo

Search for package(s) by searching the expression in name, description, short description. What exact fields are being searched by default varies in each tool. Mostly options bring tools on par.

pacman -Ss

dnf search

apt search

zypper search zypper se [-s]

emerge -S

Lists packages which have an update available. Note: Some provide special commands to limit the output to certain installation sources, others use options.

pacman -Qu

dnf list updates, dnf check-update

apt-get upgrade -> n

zypper list-updates zypper patch-check (just for patches)

emerge -uDNp world

Display a list of all packages in all installation sources that are handled by the packages management. Some tools provide options or additional commands to limit the output to a specific installation source.

pacman -Sl

dnf list available

apt-cache dumpavail apt-cache dump (Cache only) apt-cache pkgnames

zypper packages

emerge -ep world

Generates a list of installed packages

pacman -Q

dnf list installed

dpkg --list | grep ^i

zypper search --installed-only

emerge -ep world

List packages that are installed but are not available in any installation source (anymore).

pacman -Qm

dnf list extras

deborphan

zypper se -si | grep 'System Packages'

eix-test-obsolete

List packages that were recently added to one of the installation sources, i.e. which are new to it.

(none)

dnf list recent

aptitude search '~N' / aptitude forget-new

n/a

eix-diff

List installed local packages along with version

pacman -Q

rpm -qa

dpkg -l

zypper search -s; rpm -qa

emerge -e world

Search locally installed package for names or descriptions

pacman -Qs

rpm -qa '*<str>*'

aptitude search '~i(~n $name|~d $description)'

eix -S -I

List packages not required by any other package

pacman -Qt

package-cleanup --all --leaves

deborphan -anp1

List packages installed explicitly (not as dependencies)

pacman -Qe

dnf history userinstalled

apt-mark showmanual

List packages installed automatically (as dependencies)

pacman -Qd

apt-mark showauto

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SUSE/openSUSE

Gentoo

Querying package dependencies

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SLES/openSUSE

Gentoo

Display packages which require X to be installed, aka show reverse dependencies.

pacman -Sii

dnf repoquery --alldeps --whatrequires or repoquery --whatr[equires]

apt-cache rdepends / aptitude search ~D$pattern

zypper search --requires

equery depends

Display packages which conflict with given expression (often package). Search can be used as well to mimic this function.

dnf repoquery --conflicts

aptitude search '~C$pattern'

List all packages which are required for the given package, aka show dependencies.

Generates an output suitable for processing with dotty for the given package(s).

apt-cache dotty

n/a

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SUSE/openSUSE

Gentoo

Installation sources management

Action

Arch

Red Hat/Fedora

Debian/Ubuntu

SLES/openSUSE

Gentoo

Installation sources management

${EDITOR} /etc/pacman.conf

${EDITOR} /etc/yum.repos.d/${REPO}.repo

${EDITOR} /etc/apt/sources.list

${EDITOR} /etc/zypp/repos.d/${REPO}.repo

layman

Add an installation source to the system. Some tools provide additional commands for certain sources, others allow all types of source URI for the add command. Again others, like apt and dnf force editing a sources list. apt-cdrom is a special command, which offers special options design for CDs/DVDs as source.

/etc/pacman.conf

/etc/yum.repos.d/*.repo

apt-cdrom add

zypper service-add

layman, overlays

Refresh the information about the specified installation source(s) or all installation sources.