Académique Documents
Professionnel Documents
Culture Documents
Pacman/Rosetta
From ArchWiki
< Pacman
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 Command Line Comparison (http://old-
en.opensuse.org/Software_Management_Command_Line_Comparison).
Tip: Arch users having to temporarily deal with another Linux distribution can use pacapt (https://github.com/icy/pacapt), a simple wrapper around other
package managers.
Note:
Some of the tools described here are specific to a certain version of pacman. The -Qk option is new in pacman 4.1.
The command pkgfile can be found in the pkgfile (https://www.archlinux.org/packages/?name=pkgfile) package.
Contents
1 Basic operations
2 Querying specific packages
3 Querying package lists
4 Querying package dependencies
5 Installation sources management
6 Overrides
7 Verification and repair
8 Using package files and building packages
9 See also
Basic operations
Action Arch Red Hat/Fedora Debian/Ubuntu SLES/openSUSE Gentoo
https://wiki.archlinux.org/index.php/Pacman/Rosetta 1/9
09/11/2016 Pacman/Rosetta - ArchWiki
zypper install
Install a package(s) by name pacman -S dnf install apt install emerge [-a]
zypper in
zypper remove
Remove a package(s) by name pacman -Rs dnf remove apt autoremove emerge -C
zypper rm
Search for package(s) by searching the expression in name,
description, short description. What exact fields are being zypper search
pacman -Ss dnf search apt search emerge -S
searched by default varies in each tool. Mostly options zypper se [-s]
bring tools on par.
Upgrade Packages - Install packages which have an older apt update; apt zypper update emerge -u
pacman -Syu dnf upgrade
version already installed upgrade zypper up world
Upgrade Packages - Another form of the update command,
which can perform more complex updates -- like
emerge -uDN
distribution upgrades. When the usual update command pacman -Syu dnf distro-sync apt full-upgrade zypper dup
world
will omit package updates, which include changes in
dependencies, this command can perform those updates.
Clean up all local caches. Options might limit what is apt-get clean /
pacman -Sc
actually cleaned. Autoclean removes only unneeded, dnf clean all apt-get autoclean zypper clean eclean distfiles
pacman -Scc
obsolete information. / aptitude clean
Remove dependencies that are no longer needed, because
pacman -Qdtq | apt-get emerge --
e.g. the package which needed the dependencies was dnf autoremove zypper rm -u
pacman -Rs - autoremove depclean
removed.
pacman -Qm | package-cleanup -- aptitude purge
Remove packages no longer included in any repositories.
pacman -Rs - orphans '~o'
Mark a package previously installed as a dependency as pacman -D --
dnf mark install apt-mark manual emerge --select
explicitly required. asexplicit
Install package(s) as dependency / without marking as dnf install => dnf aptitude install
pacman -S --asdeps emerge -1
explicitly required. mark remove '$package&M'
apt-get install --
download-only
(into the package
Only downloads the given package(s) without unpacking or cache) zypper --download- emerge --
pacman -Sw dnf download
installing them apt-get only fetchonly
download
(bypass the
package cache)
Start a shell to enter multiple commands in one session apt-config shell zypper shell
cat cat cat located in
https://wiki.archlinux.org/index.php/Pacman/Rosetta 2/9
09/11/2016 Pacman/Rosetta - ArchWiki
Show a log of actions taken by the software management. /var/log/pacman.log dnf history /var/log/dpkg.log /var/log/zypp/history /var/log/portage
Get a dump of the whole system information - Prints, Saves
or similar the current state of the package management
(see (see
system. Preferred output is text or XML. (Note: Why apt-cache stats n/a emerge --info
/var/lib/pacman/local) /var/lib/rpm/Packages)
either-or here? No tool offers the option to choose the
output format.)
apt-get install
e-mail delivery of package changes
apt-listchanges
Action Arch Red Hat/Fedora Debian/Ubuntu SUSE/openSUSE Gentoo
https://wiki.archlinux.org/index.php/Pacman/Rosetta 3/9
09/11/2016 Pacman/Rosetta - ArchWiki
Displays packages which provide the given exp. aka reverse provides. Mainly a pkgfile dnf provides apt-file search zypper what- (only
shortcut to search a specific field. Other tools might offer this functionality provides zypper installed
through the search command. wp packages);
pfl
Search all packages to find the one which holds the specified file. auto-apt is pkgfile equery
dnf provides apt-file search zypper search -f
using this functionality. -s belongs
pacman apt-get rpm -q -- equery
Show the changelog of a package rpm -q --changelog
-Qc changelog changelog changes -f
Action Arch Red Hat/Fedora Debian/Ubuntu SUSE/openSUSE Gentoo
pacman package-
List packages not required by any other package cleanup --all deborphan -anp1
-Qt
--leaves
pacman
List packages installed explicitly (not as dependencies) apt-mark showmanual
-Qe
pacman
List packages installed automatically (as dependencies) apt-mark showauto
-Qd
Red
Action Arch Debian/Ubuntu SUSE/openSUSE Gentoo
Hat/Fedora
Overrides
Red
Action Arch Debian/Ubuntu SLES/openSUSE Gentoo
Hat/Fedora
dnf.conf <-
/etc/pacman.conf Put package name
Add a package lock rule to keep its current state from -exclude
modify IgnorePkg apt-mark hold pkg in /etc/zypp/locks, /etc/portage/package.mask
being changed option
array or zypper al
(add/amend)
Remove package
remove package
apt-mark unhold name from /etc/portage/package.mask (or
Delete a package lock rule from IgnorePkg line
pkg /etc/zypp/locks or package.unmask)
in /etc/pacman.conf
zypper rl
View
cat
Show a listing of all lock rules /etc/apt/preferences /etc/zypp/locks or cat /etc/portage/package.mask
/etc/pacman.conf
zypper ll
${EDITOR}
Set the priority of the given package to avoid ${EDITOR}
/etc/pacman.conf
upgrade, force downgrade or to overwrite any default /etc/apt/preferences, /etc/portage/package.keywords
Modify HoldPkg zypper mr -p
behavior. Can also be used to prefer a package apt-cache policy Add a line with
and/or IgnorePkg
version from a certain installation source. =category/package-version
arrays
${EDITOR}
Remove a previously set priority /etc/apt/preferences zypper mr -p /etc/portage/package.keywords
remove offending line
apt-cache policy cat
Show a list of set priorities. zypper lr -p
/etc/apt/preferences /etc/portage/package.keywords
Ignores problems that priorities may trigger. n/a
Red
Action Arch Debian/Ubuntu SUSE/openSUSE Gentoo
Hat/Fedora
https://wiki.archlinux.org/index.php/Pacman/Rosetta 7/9
09/11/2016 Pacman/Rosetta - ArchWiki
https://wiki.archlinux.org/index.php/Pacman/Rosetta 8/9
09/11/2016 Pacman/Rosetta - ArchWiki
Updates package(s) with local packages and uses the installation pacman -U dnf upgrade debi emerge
sources to resolve dependencies
Add a local package to the local package cache mostly for cp $filename cp $filename
apt-cache add n/a
debugging purposes. /var/cache/pacman/pkg/ /usr/portage/distfiles
rpm2cpio | rpm2cpio | cpio -
Extract a package tar -Jxvf dpkg-deb -x tar -jxvf
cpio -vid vid
Install/Remove packages to satisfy build-dependencies. Uses
automatic dnf builddep apt-get build-dep zypper si -d emerge -o
information in the source package.
dnf apt-cache
Display the source package to the given package name(s) n/a
repoquery -s showsrc
dnf
Downloads the corresponding source package(s) to the given Use ABS && makepkg apt-get source / zypper source-
download -- emerge --fetchonly
package name(s) -o debcheckout install
source
rpmbuild -ba
(normal) rpmbuild -ba;
Build a package makepkg -s debuild ebuild; quickpkg
mock (in build; osc build
chroot)
Check for possible packaging issues namcap rpmlint lintian rpmlint repoman
Red
Action Arch Debian/Ubuntu SUSE/openSUSE Gentoo
Hat/Fedora
See also
Changes in DNF CLI compared to Yum (http://dnf.readthedocs.org/en/latest/cli_vs_yum.html)
https://wiki.archlinux.org/index.php/Pacman/Rosetta 9/9