You are not logged in.

#1 2015-02-04 13:05:38

nforced
Member
Registered: 2015-01-04
Posts: 19

[SOLVED] reinstall all packages with --force

I want to reinstall ALL my packages since I had some sort of fs corruption, following the Wiki I can run

pacman -Qnq | pacman -S -

but then I get a ton of "exists in filesystem" like this one

xf86-video-vmware: /usr/share/man/man4/vmware.4.gz exists in filesystem
Errors occurred, no packages were upgraded.

I can solve "exists in filesystem" errors by adding --force to pacman but this is not usable with  pacman -Qnq since it only applies to -S and -U

Please advice!

Last edited by nforced (2015-02-04 13:46:00)

Offline

#2 2015-02-04 13:18:00

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [SOLVED] reinstall all packages with --force

There's something in the Wiki about exporting the list of packages you have installed to a text file and then parsing that with pacman to install packages on a new installation. You should probably do that and I need to find it.

EDIT: Found it in the pacman tricks page.

Last edited by clfarron4 (2015-02-04 13:19:49)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#3 2015-02-04 13:45:49

nforced
Member
Registered: 2015-01-04
Posts: 19

Re: [SOLVED] reinstall all packages with --force

Thanks, I solved my issue!

Here is what I did

pacman -Qqen > pkglist.txt
pacman --force -S $(< pkglist.txt)
clfarron4 wrote:

There's something in the Wiki about exporting the list of packages you have installed to a text file and then parsing that with pacman to install packages on a new installation. You should probably do that and I need to find it.

EDIT: Found it in the pacman tricks page.

Offline

#4 2015-02-04 16:17:46

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,418
Website

Re: [SOLVED] reinstall all packages with --force

I had a similar situation, where I accidentally overwrote a part of my Arch partition while resizing. After some effort I could boot it and reinstall all packages, but damage was beyond repair - home folder corrupted, random panics, etc. I'd advise to reinstall.

Last edited by Alad (2015-02-04 16:17:59)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#5 2015-02-04 16:57:55

nforced
Member
Registered: 2015-01-04
Posts: 19

Re: [SOLVED] reinstall all packages with --force

In my case only files of packages were affected, everything looks good smile

Offline

#6 2015-02-19 21:00:19

DL
Member
Registered: 2014-01-02
Posts: 1

Re: [SOLVED] reinstall all packages with --force

Don't ask me why but I managed to do a sudo rm -rf /usr/ (don't copy paste!) and it was a second or so before I cottoned on and hit ctrl + c.

Anway in addition to the above solution I did:

pacman -Qqdn > pkglist_deps.txt
pacman --force --asdeps -S $(< pkglist_deps.txt)

which covered all the packages installed as dependencies as well.

Offline

#7 2015-02-19 21:04:08

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,418
Website

Re: [SOLVED] reinstall all packages with --force

Don't ask me why but I managed to do a sudo rm -rf /usr/

At least you did, and not some runaway script (*cough* Steam *cough*) big_smile


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#8 2015-03-04 15:53:10

piotroxp
Member
Registered: 2008-08-04
Posts: 66

Re: [SOLVED] reinstall all packages with --force

I'm just applying the same thing after moving from my laptop's " / " to a new drive and then putting said new drive into a PC. Several things didn't work out of the box (naturally), even though arch booted without problems. I'll update shortly.


I invented EM Field Patterns and fixed Feynmann's Diagrams so they are physical.

Offline

#9 2015-03-04 16:41:29

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: [SOLVED] reinstall all packages with --force

Better off to do a clean reinstall than using --force on everything


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2016-04-06 07:57:53

duder2
Member
From: USA
Registered: 2009-03-21
Posts: 14

Re: [SOLVED] reinstall all packages with --force

I did the nforced commands then the DL commands and recovered my broken vbox vm.  Saved me from a reinstall due to a host crash during a pacman update.  Thanks nforced and DL.

Last edited by duder2 (2016-04-06 07:59:29)

Offline

#11 2016-04-06 08:28:23

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,327
Website

Re: [SOLVED] reinstall all packages with --force

Please don't necrobump, duder2. You should really know the rules by now.

https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB