Rosetta stone

Action Void Arch Red Hat/Fedora Debian/Ubuntu SUSE/openSUSE Gentoo
Install a package(s) by namexbps-installpacman -Sdnf installapt-get installzypper install
zypper in
emerge [-a]
Remove a package(s) by namexbps-removepacman -Rdnf removeapt-get removezypper remove
zypper rm
emerge -C
Remove a package(s) by name and its dependencies that aren't required by other installed packagesxbps-remove -Rpacman -Rszypper rm -uemerge -C then emerge -c
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.xbps-query -Rspacman -Ssdnf searchapt-cache searchzypper search
zypper se [-s]
emerge -S
Upgrade Packages - Install packages which have an older version already installedxbps-install -Supacman -Syudnf upgradeapt-get update; apt-get upgradezypper update zypper upemerge -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.xbps-install -Supacman -Syudnf distro-syncapt-get dist-upgradezypper dupemerge -uDN world
Reinstall given Package - Will reinstall the given package without dependency hassle.xbps-install -fpacman -Sdnf reinstallapt-get install --reinstallzypper install --forceemerge [-a]
Installs local package file, e.g. app.rpm and uses the installation sources to resolve dependenciespacman -Udnf installdpkg -i && apt-get install -fzypper in /path/to/local.rpmemerge
Updates package(s) with local packages and uses the installation sources to resolve dependenciespacman -Udnf upgradedebiemerge
Use some magic to fix broken dependencies in a systemxbps-pkgdb -apacman dep level - testdb, shared lib level - findbrokenpkgs or lddddnf repoquery --unsatisfiedapt-get --fix-broken
aptitude install
zypper verifyrevdep-rebuild
Only downloads the given package(s) without unpacking or installing themxbps-install -Dpacman -Swdnf downloadapt-get install --download-only (into the package cache)
apt-get download (bypass the package cache)
zypper --download-onlyemerge --fetchonly
Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.xbps-remove -opacman -Qdtq | pacman -Rs -dnf autoremoveapt-get autoremoveemerge --depclean
Downloads the corresponding source package(s) to the given package name(s)Use ABS && makepkg -odnf download --sourceapt-get source / debcheckoutzypper source-installemerge --fetchonly
Remove packages no longer included in any repositories.package-cleanup --orphansaptitude purge '~o'
Install/Remove packages to satisfy build-dependencies. Uses information in the source package.automaticdnf builddepapt-get build-depzypper si -demerge -o
Add a package lock rule to keep its current state from being changedxbps-pkgdb -m hold/etc/pacman.conf
modify IgnorePkg array
dnf.conf <--”exclude” option (add/amend)apt-mark hold pkgPut package name in /etc/zypp/locks, or zypper al/etc/portage/package.mask
Delete a package lock rulexbps-pkgdb -m unholdremove package from IgnorePkg line in /etc/pacman.confapt-mark unhold pkgRemove package name from /etc/zypp/locks or zypper rl/etc/portage/package.mask (or package.unmask)
Show a listing of all lock rulesxbps-query -Hcat /etc/pacman.conf/etc/apt/preferencesView /etc/zypp/locks or zypper llcat /etc/portage/package.mask
Add a checkpoint to the package system for later rollback(unnecessary, done on every transaction)n/a
Remove a checkpoint from the systemN/AN/An/a
Provide a list of all system checkpointsN/Adnf history listn/a
Rolls entire packages back to a certain date or checkpoint.N/Adnf history rollbackn/a
Undo a single specified transaction.N/Adnf history undon/a
Mark a package previously installed as a dependency as explicitly required.xbps-pkgdb -m manualpacman -D --asexplicitapt-mark manualemerge --select
Install package(s) as dependency / without marking as explicitly required.xbps-pkgdb -m autopacman -S --asdepsaptitude install 'pkg&M'emerge -1
Package information management
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/db/xbps/pkgdb-*.plist)(see /var/lib/pacman/local)(see /var/lib/rpm/Packages)apt-cache statsn/aemerge --info
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.xbps-query -RSpacman -[S|Q]idnf list, dnf infoapt-cache show / apt-cache policyzypper info zypper ifemerge -S; emerge -pv; eix
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.xbps-query -Rspacman -Ssdnf searchapt-cache searchzypper search zypper se [-s]emerge -S
Display changelogsapt-get changelog
e-mail delivery of package changesapt-get install apt-listchanges
Lists packages which have an update available. Note: Some provide special commands to limit the output to certain installation sources, others use options.xbps-install -Suvnpacman -Qudnf list updates, dnf check-updateapt-get upgrade -> nzypper 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 -Sldnf list availableapt-cache dumpavail apt-cache dump (Cache only) apt-cache pkgnameszypper packagesemerge -ep world
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.pkgfile <filename>dnf providesapt-file search <filename>zypper what-provides zypper wpequery belongs (only installed packages); pfl
Display packages which require X to be installed, aka show reverse/ dependencies.xbps-query -Xpacman -Siidnf providesapt-cache rdepends / aptitude search ~Dpatternzypper search --requiresequery depends
Display packages which conflict with given expression (often package). Search can be used as well to mimic this function.repoquery --whatconflictsaptitude search '~Cpattern'
List all packages which are required for the given package, aka show dependencies.xbps-query -xpacman -[S|Q]idnf repoquery --requiresapt-cache depends / apt-cache showzypper info --requiresemerge -ep
List what the current package providesdnf providesdpkg -s / aptitude showzypper info --providesequery files
List the files that the package holds. Again, this functionality can be mimicked by other more complex commands.pacman -Ql $pkgname
pkgfile -l
dnf repoquery -l $pkgnamedpkg-query -L $pkgnamerpm -ql $pkgnameequery files
List all packages that require a particular packagerepoquery --whatrequires [--recursive]aptitude search \~D{depends,recommends,suggests}:pattern / aptitude why pkgzypper search --requiresequery depends -a
Search all packages to find the one which holds the specified file. auto-apt is using this functionality.xbps-query -opkgfile -sdnf providesapt-file searchzypper search -fequery belongs
Display all packages that the specified packages obsoletes.dnf list obsoletesapt-cache show
Verify dependencies of the complete system. Used if installation process was forcefully killed.testdbdnf repoquery --requiresapt-get checkzypper verifyemerge -uDN world
Generates a list of installed packagesxbps-query -lpacman -Qdnf list installeddpkg --list | grep ^izypper search --installed-onlyemerge -ep world
List packages that are installed but are not available in any installation source (anymore).pacman -Qmdnf list extrasdeborphanzypper 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 recentaptitude search '~N' / aptitude forget-newn/aeix-diff
Show a log of actions taken by the software management.cat /var/log/pacman.logdnf historycat /var/log/dpkg.logcat /var/log/zypp/historylocated in /var/log/portage
Clean up all local caches. Options might limit what is actually cleaned. Autoclean removes only unneeded, obsolete information.xbps-remove -Opacman -Sc
pacman -Scc
dnf clean allapt-get clean / apt-get autoclean / aptitude cleanzypper cleaneclean distfiles
Add a local package to the local package cache mostly for debugging purposes.cp $pkgname /var/cache/pacman/pkg/apt-cache addn/acp $srcfile /usr/portage/distfiles
Display the source package to the given package name(s)repoquery -sapt-cache showsrcn/a
Generates an output suitable for processing with dotty for the given package(s).apt-cache dottyn/a
Set the priority of the given package to avoid upgrade, force downgrade or to overwrite any default behavior. Can also be used to prefer a package version from a certain installation source.${EDITOR} /etc/pacman.conf
Modify HoldPkg and/or IgnorePkg arrays
/etc/apt/preferences, apt-cache policyzypper mr -p${EDITOR} /etc/portage/package.keywords
Add a line with =category/package-version
Remove a previously set priority/etc/apt/preferenceszypper mr -p${EDITOR} /etc/portage/package.keywords
remove offending line
Show a list of set priorities.apt-cache policy /etc/apt/preferenceszypper lr -pcat /etc/portage/package.keywords
Ignores problems that priorities may trigger.n/a
Installation sources management${EDITOR} /etc/xbps.d/*.conf
${EDITOR} /usr/share/xbps.d/*.conf
${EDITOR} /etc/pacman.conf${EDITOR} /etc/yum.repos.d/${REPO}.repo${EDITOR} /etc/apt/sources.list${EDITOR} /etc/zypp/repos.d/${REPO}.repolayman
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.${EDITOR} /etc/xbps.d/*.conf or *{EDITOR} /usr/share/xbps.d/*.conf/etc/pacman.conf/etc/yum.repos.d/*.repoapt-cdrom addzypper service-addlayman, overlays
Refresh the information about the specified installation source(s) or all installation sources.xbps-install -Spacman -Sy (always upgrade the whole system afterwards)dnf clean expire-cache && dnf check-updateapt-get updatezypper refresh zypper reflayman -f
Prints a list of all installation sources including important information like URI, alias etc.xbps-query -Lcat /etc/pacman.d/mirrorlistcat /etc/yum.repos.d/*apt-cache policyzypper service-listlayman -l
Disable an installation source for an operationdnf --disablerepo=emerge package::repo-to-use
Download packages from a different version of the distribution than the one installed.dnf --releasever=apt-get install -t release package/ apt-get install package/release (deps not covered)echo "category/package ~amd64" >> /etc/portage/package.keywords && emerge package
Other commands
Start a shell to enter multiple commands in one sessionapt-config shellzypper shell
Package Verification
Single packagepacman -Qk[k] <package>rpm -V <package>debsumsrpm -V <package>equery check
All packagespacman -Qk[k]rpm -Vadebsumsrpm -Vaequery check
Package Querying
List installed local packages along with versionxbps-query -lpacman -Qrpm -qadpkg -lzypper search -s; rpm -qaemerge -e world
Display local package information: Name, version, description, etc.xbps-querypacman -Qirpm -qidpkg -s / aptitude showzypper info; rpm -qiemerge -pv and emerge -S
Display remote package information: Name, version, description, etc.xbps-query -Rpacman -Sidnf infoapt-cache show / aptitude showzypper infoemerge -pv and emerge -S
Display files provided by local packagexbps-query -fpacman -Qlrpm -qldpkg -Lrpm -Qlequery files
Display files provided by a remote packagexbps-query -Rfpkgfile -lrepoquery -lapt-file list patternpfl
Query the package which provides FILExbps-query -Ro (remote)
xbps-query -o (local)
pacman -Qorpm -qf (installed only) or dnf provides (everything)dpkg -S / dlocatezypper search -fequery belongs
Query a package supplied on the command line rather than an entry in the package management databasepacman -Qprpm -qpdpkg -I
Show the changelog of a packagepacman -Qcrpm -q --changelogapt-get changelogequery changes -f
Search locally installed package for names or descriptionsxbps-query -spacman -Qsrpm -qa '*<str>*'aptitude search '~i(~n name|~d description)'eix -S -I
List packages not required by any other packagexbps-query -Opacman -Qtpackage-cleanup --all --leavesdeborphan -anp1
Building Packages
Build a packagexbps-src (note 1)makepkg -srpmbuild -ba (normal)
mock (in chroot)
debuildrpmbuild -ba; build; osc buildebuild; quickpkg
Check for possible packaging issuesxlint (note 2)namcaprpmlintlintianrpmlintrepoman
List the contents of a package filepacman -Qpl <file>rpmls rpm -qpldpkg -crpm -qpl
Extract a packagetar -Jxvfrpm2cpio | cpio -viddpkg-deb -xrpm2cpio | cpio -vidtar -jxvf
Query a package supplied on the command line rather than an entry in the package management databasepacman -Qprpm -qpdpkg -I
Action Void Arch Red Hat/Fedora Debian/Ubuntu SUSE/openSUSE Gentoo

Notes

  • Note 1: xbps-src is not part of the base Void Linux install; see the xbps-src page for details
  • Note 2: xlint is part of the xtools package
This article is issued from Voidlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.