Professional Documents
Culture Documents
COMMANDS_LINUX
COMMANDS_LINUX
COMMANDS_LINUX
This page uses a table to display the correspondence of package management commands among some of the
most popular Linux distributions. The original inspiration was given by openSUSE's Software Management
Basic operations
SLES/
Action Arch Red Hat/Fedora Debian/Ubuntu Gentoo
openSUSE
Upgrade Packages -
Another form of the
update command, which
can perform more
complex updates -- like
distribution upgrades.
pacman - apt update && apt emerge -
When the usual update dnf distro-sync zypper dup
Syu dist-upgrade uDN world
command will omit
package updates, which
include changes in
dependencies, this
command can perform
those updates.
Clean up all local caches. pacman -Sc dnf clean all apt autoclean zypper clean eclean
Options might limit what
is actually cleaned.
pacman -
Autoclean removes only apt clean distfiles
Scc
unneeded, obsolete
information.
pacman -
Remove packages no
Qmq | package-cleanup
longer included in any aptitude purge '~o'
pacman -Rs --orphans
repositories.
-
Mark a package
previously installed as a pacman -D emerge --
dnf mark install apt-mark manual
dependency as explicitly --asexplicit select
required.
Install package(s) as
dependency / without pacman -S dnf install => dnf
apt-mark auto emerge -1
marking as explicitly --asdeps mark remove
required.
apt install --
download-only
Only downloads the given
(into the package
package(s) without zypper -- emerge --
pacman -Sw dnf download cache)
unpacking or installing download-only fetchonly
apt download
them
(bypass the
package cache)
SUSE/
Action Arch Red Hat/Fedora Debian/Ubuntu Gentoo
openSUSE
emerge -pv
Display remote package apt-cache
pacman and emerge -S
information: Name, version, dnf info show / zypper info
-Si or equery m
description, etc. aptitude show
(meta)
dnf repoquery -l or
Display files provided by a pacman apt-file list
repoquery -l (from pfl
remote package -Fl $pattern
package yum-utils)
Debian/ SUSE/
Action Arch Red Hat/Fedora Gentoo
Ubuntu openSUSE
Display a list of all pacman dnf list available apt-cache zypper packages emerge -ep
packages in all installation -Sl dumpavail apt- world
sources that are handled cache dump
by the packages (Cache only)
management. Some tools
provide options or
additional commands to apt-cache
limit the output to a pkgnames
specific installation
source.
Generates a list of pacman dpkg --list | grep zypper search -- emerge -ep
dnf list installed
installed packages -Q ^i installed-only world
SUSE/
Action Arch Red Hat/Fedora Debian/Ubuntu Gentoo
openSUSE
Display packages which pacman dnf repoquery -- apt-cache rdepends / zypper equery
alldeps --
require X to be installed, aka whatrequires or aptitude search search --
-Sii depends
show reverse dependencies. repoquery -- ~D$pattern requires
whatr[equires]
aptitude search
dnf repoquery -- ~D{depends,recomm zypper equery
List all packages that require
alldeps -- ends,suggests}: search -- depends -
a particular package
whatrequires $pattern / aptitude requires a
why
SUSE/
Action Arch Red Hat/Fedora Debian/Ubuntu Gentoo
openSUSE
${EDITOR} ${EDITOR} /
${EDITOR} / ${EDITOR}
Installation sources /etc/yum.repos. etc/zypp/repos
etc/pacman.co /etc/apt/sources layman
management d/$ .d/$
nf .list
{REPO}.repo {REPO}.repo
Disable an installation
dnf -- emerge
source for an
disablerepo= package::repo-to-use
operation
apt-get install -
echo
Download packages t release
"category/package
from a different package/ apt-
dnf -- ~amd64" >>
version of the get install
releasever= /etc/portage/package.
distribution than the package/releas
keywords &&
one installed. e (deps not
emerge package
covered)
Overrides
Red Debian/ SLES/
Action Arch Gentoo
Hat/Fedora Ubuntu openSUSE
${EDITOR}
/etc/portage/package.
Remove a previously /etc/apt/
zypper mr -p keywords
set priority preferences
remove offending
line
apt-cache
cat
Show a list of set policy
zypper lr -p /etc/portage/package.
priorities. /etc/apt/prefer
keywords
ences
Verify single package pacman -Qk[k] rpm -V debsums rpm -V equery check
Verify all packages pacman -Qk[k] rpm -Va debsums rpm -Va equery check
Reinstall given
Package - Will zypper
apt install --
reinstall the given pacman -S dnf reinstall install -- emerge -1O
reinstall
package without force
dependency hassle.
Verify dependencies
of the complete
dnf repoquery -- apt-get zypper emerge -uDN
system. Used if pacman -Dk
requires check verify world
installation process
was forcefully killed.
Remove a checkpoint
N/A N/A n/a
from the system
Undo a single
N/A dnf history undo n/a
specified transaction.
cp
Add a local package to the cp $filename
$filename
local package cache mostly /var/cache/pacm apt-cache add n/a
/usr/portage/d
for debugging purposes. an/pkg/
istfiles
rpm2cpio | rpm2cpio |
Extract a package tar -Jxvf dpkg-deb -x tar -jxvf
cpio -vid cpio -vid
Install/Remove packages to
satisfy build-dependencies. dnf apt-get build-
automatic zypper si -d emerge -o
Uses information in the builddep dep
source package.
dnf
Display the source package to apt-cache
repoquery - n/a
the given package name(s) showsrc
s
rpmbuild -
rpmbuild -ba;
ba (normal) ebuild;
Build a package makepkg -s debuild build; osc
mock (in quickpkg
build
chroot)
Red
Debian/ SUSE/
Action Arch Hat/Fedor Gentoo
Ubuntu openSUSE
a