Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a package that's installed on my PC as an dependency to another package.

I would like to have the package explicitly installed, but without actually re-installing it, or downloading any files.

Is this possible?


I do not have any packages cached in /var/cache/pacman/pkg, which is one of the reasons I want to change the package detail without a re-install.

Even If I had the packages cached, running pacman -S would mean the whole install proccess is run, which I also want to avoid.

share|improve this question
up vote 22 down vote accepted

I found the answer on Arch Linux Forums

Since pacman 3.4 you can use

# pacman -D

to modify only the database. So:

# pacman -D --asexplicit <pkgs>

will make <pkgs> explicitly installed.

share|improve this answer

pacman -S has a --asexplicit flag that should do what you want.

For example:

> pacman -Qi mutagen            
Install Reason : Installed as a dependency for another package

> pacman -S --asexplicit mutagen
warning: mutagen-1.20-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Targets (1): mutagen-1.20-1

Total Download Size:    0.00 MB
Total Installed Size:   0.82 MB

> pacman -Qi mutagen
Install Reason : Explicitly installed

You can see that nothing was downloaded since it is already installed locally. It just flipped the "Install Reason" field.

Pacman has different --help operations depending on the operation (-S, -R, etc.). So pacman -S --help lists the --asexplicit flag as one of the available flags. --asdeps is available as well.

share|improve this answer
please see the edits I made to the question – Stefan Sep 14 '10 at 11:52

To install only if is not already installed you can use --needed flag:

pacman -S mutagen
pacman -S --needed mutagen clone

Will skip mutagen reinstalation if is already installed by the first command. And you will also get a nice info about that

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.