Pacman – Make Package Explicitly Installed in Pacman

arch linuxpackage-managementpacman

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?

update:

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.

Best Answer

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.

The pacman manpage further describes this command.

Related Question