You are not logged in.
Pages: 1
Hello!
I accidentally removed /usr/lib from my system. I got my hands on enough files to get pacman working again(thankfully). But now I need to reinstall every package on my computer to make sure that each and every file exists that needs to exist.
This has to be done before I reboot so I do not miss any critical files.
Any suggestions? Installing them manually will take a long, long time.
Offline
I didn't have this case yet, but maybe try the pacman -k opption (check if given package is missing files, if no package specified checks all, is what the manpage says) to see which packages are affected?
Ogion
(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant
Offline
Never done this before. You could grab a list of all packages with
pacman -Qs | grep local | cut -d'/' -f2 | cut -d' ' -f1 > installed_packages
and then reinstall them with
sudo pacman -S `cat installed_packages`
But this would fail if there are packages installed which are from the AUR. They should be removed from the list somehow.
YES WE CAN
(but that doesn't necessarily mean we're going to)
Offline
There's a forum post or wiki article which describes soemthing like this:
comm -13 <(pacman -Qmq | sort) <(pacman -Qq | sort) > ~/pkglist
then
cat pkglist | xargs pacman -S --needed --noconfirm
Please do a forum search before trying this as I don't remember where I first found it.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Thanks!
That worked, but there are still lots and lots of packages, any idea how to reinstall all these?
Didn't see previous post when I posted this one. Will look into that.
Last edited by Nibble (2010-06-27 19:55:16)
Offline
You can list your aur packages with "pacman -Qqm". Hope this helps.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
It's also a good idea to run
pacman -Qk | grep ^warning:
as root.
Offline
Seems to be working now, will wait for reboot until I mark it solved.
Offline
There's a forum post or wiki article which describes soemthing like this:
comm -13 <(pacman -Qmq | sort) <(pacman -Qq | sort) > ~/pkglist
then
cat pkglist | xargs pacman -S --needed --noconfirm
No sort,
LC_ALL=C comm -23 <(pacman -Qq) <(pacman -Qmq)
No cat,
xargs pacman -S --needed --noconfirm < pkglist
And pacman doesn't have ARG_MAX,
pacman $(for i in {1..999}; do echo -h; done)
so no xargs either.
pacman -S --needed --noconfirm $(< pkglist)
Offline
loafer wrote:There's a forum post or wiki article which describes soemthing like this:
comm -13 <(pacman -Qmq | sort) <(pacman -Qq | sort) > ~/pkglist
then
cat pkglist | xargs pacman -S --needed --noconfirm
No sort,
LC_ALL=C comm -23 <(pacman -Qq) <(pacman -Qmq)
No cat,
xargs pacman -S --needed --noconfirm < pkglist
And pacman doesn't have ARG_MAX,
pacman $(for i in {1..999}; do echo -h; done)
so no xargs either.
pacman -S --needed --noconfirm $(< pkglist)
which is why I said:
Please do a forum search before trying this as I don't remember where I first found it.
Please quote in it's entirety.
Last edited by loafer (2010-06-27 21:01:54)
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Pages: 1