From ArchWiki
Revision as of 14:05, 23 July 2013 by Kynikos (Talk | contribs) (FAQ: reinstalling all packages: again, if you split a discussion, please copy the original signature at the end of every new section)

Jump to: navigation, search


IMO it should be added to this page. You can get text from [1]. --Beroal 13:13, 8 November 2010 (EST)

FAQ: reinstalling all packages

There is a similar entry in Pacman_Tips#Reinstalling_all_packages. The one stated in the Pacman article breaks if you've got packages installed which aren't from the repositories, e.g. AUR. The command in Pacman-Tips doesn't reinstall those. Using a Pacman & an AUR wrapper like yaourt, you can run the command from the Pacman article without a problem. Archlinuxomane (talk) 06:42, 21 July 2013 (UTC)

No, it should not break. Try it yourself:
$ pacman -Qeq > pactest && less pactest |grep google-earth
That package is from AUR, installed with the "-U" option. If your question is answered with that, strike out the heading so that someone cleans it off. If not answered, please clarify what you miss. --Indigo (talk) 16:26, 21 July 2013 (UTC)
I think Archlinuxomane has a point, pacman -Qeq will indeed retrieve also AUR packages, and pacman -S will try to install them without finding them neither in the cache nor in the repos, thus exiting with an error.
-- Kynikos (talk) 09:50, 22 July 2013 (UTC)
Ah, yes - thanks. I was too quick there in my conclusion above. I guess this could be overcome by adding a custom repo in pacman.conf, but this is not at question of course. --Indigo (talk) 17:52, 22 July 2013 (UTC)
Moreover, as stated in Pacman Tips, pacman -S preserves the installation reason by default, so there's no need to differentiate between explicit and dependency packages.
In the end, my opinion is that pacman -Qnq | pacman -S - is the correct solution to the problem (note the difference from the command in Pacman Tips, this command is indeed reinstalling all packages, not only the explicit ones) plus a search and install with pacman -Qmq.
-- Kynikos (talk) 09:50, 22 July 2013 (UTC)
Of course, this is all true provided that all the involved packages are already installed in the system, we're not talking of installing the same list of packages on another system or after uninstalling some, otherwise the differentiation between explicit and dependency packages must be done. -- Kynikos (talk) 10:12, 22 July 2013 (UTC)

I'm new to Arch and am not going to run around editing pages in the wiki, so if anyone wants to wrap this info up in a more concise manner, I think it would be a good addition to the wiki. Maybe also a hint that the command doesn't necessarily redownload the packages as well but uses the local Pacman cache. Archlinuxomane (talk) 06:42, 21 July 2013 (UTC)

(removed my erroneous answer, see above for rest --Indigo (talk) 17:52, 22 July 2013 (UTC))