Pacman Tips

From Manjaro Linux
Revision as of 23:29, 15 August 2013 by Roland (Talk | contribs)

Jump to: navigation, search

A a quick reference page about the most common commands used by Pacman & various popular wrappers:

Optimize the sync and download speed:

pacman-optimize && sync

Update System:

  • Pacman can update your system with only one command:
pacman -Su
  • BTW ,it will be usually better to sync your repo database first:
pacman -Syu

Update & ignore a package:


Update & ignore a package group:

  • Examples:


  • It is always best to have the repo databases synchronised & the all of packages installed on your system up to date before you install any new packages.
pacman -Syu

Install a package:

pacman -S package_name
  • If for example you are using the testing repo, & you have that repo listed below your other repos in /etc/pacman.conf which should mean that an older package will take priority over the younger one in the testing repo, you should use pacman like this:
pacman -S testing/package_name

Install packages as a group:

pacman -S gnome
pacman -S kde

Download a package without installation:

pacman -Sw package_name

Install a downloaded or a local package:

pacman -U /package_path/package_name.pkg.tar.xz
  • You can also use the URL:
pacman -U http://www.examplepackage/repo/examplepkg.tar.xz

Reinstall all packages:

pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")

To search which packages has been installed in a group:

pacman -Sg gnome
pacman -Sg kde

Get a full package list with versions:

sudo pacman -Q > laptop.pacman
  • After entering the password, a file called pacman.laptop is created in your home folder.


Remove a package:

pacman -R package_name

Remove a package with dependencies that are not being used by other packages:

pacman -Rs package_name

Remove a package with all dependencies:

pacman -Rsc package_name
  • Remove package & its conf files too:
pacman -Rn package_name

Remove all unneeded packages:

pacman -Rsn $(pacman -Qdtq)

Remove all packages from the cache:

pacman -Scc


  • See this page Maintaining var/cache/pacman/pkg for System Safety for an in depth view on this topic: [1]

Cleaning the cache:

  • Leaves packages in your cache only for those packages which are currently installed on your system.
pacman -Sc

Cleaning orphan packages from the system:

pacman -Rs $(pacman -Qtdq)
  • See this page Orphan Package Removal for more on this topic: [2]


Provides a description of searched for package & associated packages:

pacman -Ss package_name

Provides a description of previously installed package:

pacman -Qs package_name

Provides detailed summary of a package:

pacman -Si package_name
  • Modified summary:
pacman -Qi package_name
  • with 'ii' you can see the backup files and the date that the package has been changed.
pacman -Qii package_name

Get a list of installed packages:

pacman -Q

Find out which package owns a file:

pacman -Qo /file_path

List all orphan packages with no dependencies:

pacman -Qdt

View package dependencies:

pactree package_name

AUR (Arch User Repository)

  • Following is info on three popular options for using the AUR, for a detailed list of their commands please look at their man pages:


sudo pacman -S yaourt
  • (This is pre-installed with Manjaro, so you don't need to run this cmd).
  • To use yaourt to upgrade both official repos & AUR use the following command:
sudo yaourt -Syua


  • Uses the some of the same commands as pacman but differs in that it checks both the official repos & AUR.
yaourt -S packer
  • Having installed 'packer' then you can run:
packer -S package_name
  • This will upgrade from both official repos & AUR:
packer -Syu


  • Developed by 'tarakbumba' and similar to packer. To install meric:
yaourt -S meric
packer -S meric
  • To use meric to install a package:
meric -S package_name


  • Please post any correction, or improvements into this Manjaro forum thread: