Install Rpm Package On Arch Linux

  

Linux in general: all the big distributions come with their own repositories of pre-prepared packages, and you normally don't have to go to a website, download, and install anything. The distribution will fetch the program and install it for you. For Arch, neither.debs or.rpms are appropriate to use.

< 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.

Tip: Arch users having to temporarily deal with another Linux distribution can use 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.
Install Rpm Package On Arch Linux

Basic operations

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
Install a package(s) by namepacman -Sdnf installapt installzypper install or zypper inemerge [-a]
Remove a package(s) by namepacman -Rsdnf removeapt removezypper remove or zypper rmemerge -[a]vc
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 -Ssdnf searchapt searchzypper search or zypper se [-s]emerge -S
Upgrade Packages - Install packages which have an older version already installedpacman -Syudnf upgradeapt update and then apt upgradezypper update or zypper upemerge -[a]uDN @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 -Syudnf distro-syncapt update and then apt dist-upgradezypper dupemerge -[a]uDN @world
Clean up all local caches. Options might limit what is actually cleaned.pacman -Sc or pacman -Sccdnf clean allapt autoclean removes only unneeded, obsolete information or apt cleanzypper cleaneclean distfiles
Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.pacman -Qdtq | pacman -Rs -dnf autoremoveapt autoremovezypper rm -u (just for removing a package) or zypper packages --unneeded (listing only and without recursion)emerge [-a] --depclean
Remove packages no longer included in any repositories.pacman -Qmq | pacman -Rs -dnf repoquery --extrasaptitude purge '~o'
Mark a package previously installed as a dependency as explicitly required.pacman -D --asexplicitdnf mark installapt-mark manualzypper install --force (workaround which needs to reinstall the package)emerge --select
Install package(s) as dependency / without marking as explicitly required.pacman -S --asdepsdnf install and then dnf mark removeapt-mark auton/a (feature request)emerge [-a] --oneshot or emerge [-a] -1
Only downloads the given package(s) without unpacking or installing thempacman -Swdnf downloadapt install --download-only (into the package cache) or apt download (bypass the package cache)zypper --download-onlyemerge [-a] --fetchonly
Start a shell to enter multiple commands in one sessiondnf shellapt-config shellzypper shell
Show a log of actions taken by the software management.read /var/log/pacman.logdnf historyread /var/log/dpkg.logread /var/log/zypp/historyread /var/log/portage
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/localsee /var/lib/rpm/Packagesapt-cache statsemerge --info
e-mail delivery of package changesapt install apt-listchanges
  1. For Fedora and CentOS, download the.rpm package and use the command given below. Sudo rpm -i figma-linux-.rpm. On Arch, figma–linux is available directly from the Arch User Repository or AUR. To install it, use the following command.
  2. Sep 06, 2017 One of the best things about Arch Linux is how many ways users can install packages – from the AUR, to custom repositories, to decompiling other distributions’ packages so they’ll run. Though this information isn’t new, it’s certainly a good resource for those new to Arch and looking for ways to install their favorite programs.
  3. Re: Installing rpm or deb packages. Tdy wrote: Inxsible wrote: if you have already created a tar.gz from the deb, then its a simple matter of installing it using pacman. Pacman -U /path/to/filename.tar.gz. To find out more about the options that pacman provides.
  4. Visual Studio Code has installer for debian (.deb) and rpm (.rpm) based Linux distributions. Officially, no such installer is available for Arch Linux. This is how to install several packages you have installed into a directory # pacman -U /root/Download/.tar.gz A slightly contrived example.

Querying specific packages

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
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.pacman -Si or pacman -Qidnf list or dnf infoapt show or apt-cache policyzypper info or zypper ifemerge -S, emerge -pv or eix
Display local package information: Name, version, description, etc.pacman -Qirpm -qi / dnf info installeddpkg -s or aptitude showzypper info or rpm -qiemerge -pv or emerge -S
Display remote package information: Name, version, description, etc.pacman -Sidnf infoapt-cache show or aptitude showzypper infoemerge -pv and emerge -S or equery meta
Display files provided by local packagepacman -Qlrpm -qldpkg -Lrpm -qlequery files or qlist
Display files provided by a remote packagepacman -Fldnf repoquery -l or repoquery -l (from package yum-utils)apt-file listpfl
Query the package which provides FILEpacman -Qorpm -qf (installed only) or dnf provides (everything) or repoquery -f (from package yum-utils)dpkg -S or dlocatezypper search -fequery belongs or qfile
List the files that the package holds. Again, this functionality can be mimicked by other more complex commands.pacman -Ql or pacman -Fldnf repoquery -ldpkg-query -Lrpm -qlequery files or qlist
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 -Fdnf providesapt-file searchzypper what-provides or zypper wpequery belongs (only installed packages) or pfl
Search all packages to find the one which holds the specified file.pacman -Fdnf providesapt-file search or auto-apt is using this functionality.zypper search -fequery belongs or qfile
Show the changelog of a packagepacman -Qcdnf changelogapt-get changelogrpm -q --changelogequery changes -f

Querying package lists

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
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 -Ssdnf searchapt searchzypper search or zypper se -semerge -S or eix
Lists packages which have an update available. Note: Some provide special commands to limit the output to certain installation sources, others use options.pacman -Qudnf list updates or dnf check-updateapt list --upgradablezypper list-updates or 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 or apt-cache dump (Cache only) or apt-cache pkgnameszypper packagesportageq all_best_visible /
Generates a list of installed packagespacman -Qdnf list installeddpkg --list | grep ^izypper search --installed-onlyqlist -IC
List packages that are installed but are not available in any installation source (anymore).pacman -Qmdnf list extrasapt --installed list | grep ,localzypper 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.dnf list recentaptitude search '~N' or aptitude forget-neweix-diff
List installed local packages along with versionpacman -Qrpm -qadpkg -l or apt list --installedzypper search -s or rpm -qaqlist -ICv
Search locally installed package for names or descriptionspacman -Qsrpm -qa '*<str>*'aptitude search '~i(~n $name|~d $description)'eix -S -I
List packages not required by any other packagepacman -Qttdnf leaves or package-cleanup --leaves --alldeborphan -anp1emerge -pc
List packages installed explicitly (not as dependencies)pacman -Qednf history userinstalledapt-mark showmanualgrep -E '^i+' (workaround)emerge -pvO @selected or eix --selected
List packages installed automatically (as dependencies)pacman -Qdgrep -E '^i[^+]' (workaround)apt-mark showauto

Querying package dependencies

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
Display packages which require X to be installed, aka show reverse dependencies.pacman -Siidnf repoquery --alldeps --whatrequires or repoquery --whatrequiresapt-cache rdepends or aptitude search ~D$patternzypper search --requiresemerge -pvc
Display packages which conflict with given expression (often package). Search can be used as well to mimic this function.dnf repoquery --conflictsaptitude search '~C$pattern'
List all packages which are required for the given package, aka show dependencies.pacman -Si or pacman -Qidnf repoquery --requires or repoquery -Rapt-cache depends or apt-cache showzypper info --requiresemerge -ep
List what the current package providesdnf repoquery --providesdpkg -s or aptitude showzypper info --providesequery files or qlist
List all packages that require a particular packagednf repoquery --installed --alldeps --whatrequiresaptitude search ~D{depends,recommends,suggests}:$pattern or aptitude whyzypper search --requiresequery depends -a
Display all packages that the specified packages obsoletes.dnf list obsoletesapt-cache show
Generates an output suitable for processing with dotty for the given package(s).apt-cache dotty

Installation sources management

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
Installation sources managementedit /etc/pacman.confedit /etc/yum.repos.d/${REPO}.repoedit /etc/apt/sources.listedit /etc/zypp/repos.d/${REPO}.repolayman or eselect repository
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.edit /etc/pacman.conf/etc/yum.repos.d/*.repoapt-cdrom addzypper service-addlayman or overlays
Refresh the information about the specified installation source(s) or all installation sources.pacman -Sy (always upgrade the whole system afterwards)dnf clean expire-cache and then dnf check-updateapt-get updatezypper refresh or zypper refemerge --sync or layman -S
Prints a list of all installation sources including important information like URI, alias etc.cat /etc/pacman.d/mirrorlistcat /etc/yum.repos.d/*apt-cache policyzypper service-listlayman -l or eselect repository list
List all packages from a certain repopaclist <repo>eix --in-overlay
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 or apt-get install package/release (dependencies not covered)echo 'category/package ~amd64' >> /etc/portage/package.keywords and then emerge package

Overrides

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
Add a package lock rule to keep its current state from being changededit /etc/pacman.conf modifying IgnorePkg arrayedit dnf.conf adding/amending the exclude optionapt-mark hold pkgzypper al or put package name in /etc/zypp/locks/etc/portage/package.mask
Delete a package lock ruleedit /etc/pacman.conf removing package from IgnorePkg lineapt-mark unhold pkgzypper rl or remove package name from /etc/zypp/locks/etc/portage/package.mask (or package.unmask)
Show a listing of all lock rulescat /etc/pacman.conf/etc/apt/preferenceszypper ll or view /etc/zypp/lockscat /etc/portage/package.mask
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.edit /etc/pacman.conf modifying HoldPkg and/or IgnorePkg arrays/etc/apt/preferences, apt-cache policyzypper mr -pedit /etc/portage/package.accept_keywords adding a line with =category/package-version
Remove a previously set priority/etc/apt/preferenceszypper mr -pedit /etc/portage/package.accept_keywords removing offending line
Show a list of set prioritiesapt-cache policy or /etc/apt/preferenceszypper lr -pgrep -r . /etc/portage/package.accept_keywords
Ignore problems that priorities may trigger.n/a

Verification and repair

Install Rpm Package On Arch Linux Download

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
Verify single packagepacman -Qk (can add another k)rpm -Vdebsumsrpm -Vequery check
Verify all packagespacman -Qk (can add another k)rpm -Vadebsumsrpm -Vaequery check
Reinstall given package; this will reinstall the given package without dependency hasslepacman -Sdnf reinstallapt install --reinstallzypper install --forceemerge -1O
Verify dependencies of the complete system; used if installation process was forcefully killedpacman -Dkdnf repoquery --requiresapt-get checkzypper verifyemerge -uDN @world
Use some magic to fix broken dependencies in a systemfor pacman dependency level, use pacman -Dk; for shared library level, use findbrokenpkgsAUR or lddd (from devtools)dnf repoquery --unsatisfiedapt-get --fix-broken and then aptitude installzypper verifyrevdep-rebuild
Add a checkpoint to the package system for later rollback(unnecessary, it is 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 checkpointn/adnf history rollbackn/a
Undo a single specified transactionn/adnf history undon/a

Using package files and building packages

ActionArchRed Hat/FedoraDebian/UbuntuSLES/openSUSEGentoo
Query a package supplied on the command line rather than an entry in the package management databasepacman -Qprpm -qpdpkg -I
List the contents of a package filepacman -Qplrpmls rpm -qpldpkg -crpm -qpl
Install local package file, e.g. app.rpm and uses the installation sources to resolve dependenciespacman -Udnf installapt installzypper inemerge
Updates package(s) with local packages and uses the installation sources to resolve dependenciespacman -Udnf upgradedebiemerge
Add a local package to the local package cache mostly for debugging purposes.cp package-filename /var/cache/pacman/pkg/apt-cache add package-filenamen/acp package-filename /usr/portage/distfiles
Extract a packagetar -Jxvfrpm2cpio | cpio -viddpkg-deb -xrpm2cpio | cpio -vidtar -jxvf
Install/Remove packages to satisfy build-dependencies. Uses information in the source packageUse ABS and makepkg -seocdnf builddepapt-get build-depzypper si -demerge -o
Display the source package to the given package name(s)dnf repoquery -sapt-cache showsrcn/a
Download the corresponding source package(s) to the given package name(s)Use ABS and makepkg -odnf download --sourceapt-get source or debcheckoutzypper source-installemerge --fetchonly
Build a packagemakepkg -srpmbuild -ba (normal) or mock (in chroot)debuildrpmbuild -ba, then build, and then osc buildebuild or quickpkg
Check for possible packaging issuesnamcap
(requires namcap)
rpmlintlintianrpmlintrepoman

Log file rotation

Install Rpm Package On Arch Linux Mint

By default, Arch Linux does not rotate pacman.log. See, for example, FS#11272 and FS#20428#comment66480. This is in contrast to the default policy of most other Linux distributions. Some distributions, notably Gentoo, hardly write log files by default.

See also

Install Rpm Package On Arch Linux Operating System

Retrieved from 'https://wiki.archlinux.org/index.php?title=Pacman/Rosetta&oldid=687911'