You are not logged in.

#1 2008-02-17 09:40:01

Som_Gye
Member
Registered: 2008-02-17
Posts: 2

[Solved] Forcing pacman to reinstall all packages.

To avoid making myself look any stupider than necessary, I'll try and keep this short.

I ran out of space on my root partition in the middle of a pacman -Syu. This resulted in a lot of non-functioning packages. I have already successfully increased the size of the partition to about four times its old size using the Gparted LiveCD, and miraculously enough, Archlinux still boots, I still have wifi (and thus Internet access), and pacman still works. If pacman upgrades a package, it appears to start functioning again, which is nice. Now the problem.

Essentially, I would like to perform an upgrade on all packages on my system, including the ones that are up to date. This should fix them. Unfortunately, pacman -Syu (or -Syuf) only upgrades packages that appear out of date. I'm aware that I can accomplish this on a package by package basis simply using pacman -S, but I don't know of a way to obtain a list of all installed packages. How might I upgrade all the up to date ones as well?

Also, if anyone asks why my root partition was so small, the answer is some variation on the phrase "I'm an idiot".

Last edited by Som_Gye (2008-02-18 05:00:06)

Offline

#2 2008-02-17 09:44:51

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [Solved] Forcing pacman to reinstall all packages.

http://bbs.archlinux.org/viewtopic.php? … 99#p326499

Btw, running out of space can happen to anyone. But it's indeed better to prevent it from happening,
because several apps can do weird things when it happens, pacman the first.
And sadly, it's rather difficult to implement this free space detection cleanly in apps.
An attempt was made in pacman a while ago, but it has been removed because it didn't work good enough :
http://projects.archlinux.org/git/?p=pa … ad18ac1a7c

Last edited by shining (2008-02-17 09:55:41)


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2008-02-17 09:47:04

neotuli
Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204
Website

Re: [Solved] Forcing pacman to reinstall all packages.

pacman -S `pacman -Q| cut -d' ' -f1`

So to answer your question, 'pacman -Q' lists installed packages. By the sounds of it, you might want to browse through the pacman manpage (it's good stuff, really!), there are a lot of nifty options you probably don't know about yet.

Also I'm guessing the excuse you're looking for is something like... "i didn't get my tacos that day" wink


The suggestion box only accepts patches.

Offline

#4 2008-02-17 10:58:02

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: [Solved] Forcing pacman to reinstall all packages.

neotuli wrote:
pacman -S `pacman -Q| cut -d' ' -f1`

So to answer your question, 'pacman -Q' lists installed packages. By the sounds of it, you might want to browse through the pacman manpage (it's good stuff, really!), there are a lot of nifty options you probably don't know about yet.

Also I'm guessing the excuse you're looking for is something like... "i didn't get my tacos that day" wink

Please feel free to shoot me down in flames if I am wrong smile won't this mark everything as explicitly installed?  Not usre if that would be a problem or not.

Offline

#5 2008-02-17 11:12:06

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [Solved] Forcing pacman to reinstall all packages.

gazj wrote:
neotuli wrote:
pacman -S `pacman -Q| cut -d' ' -f1`

Please feel free to shoot me down in flames if I am wrong smile won't this mark everything as explicitly installed?  Not usre if that would be a problem or not.

It should not. Pacman normally keeps the reason on a reinstall.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#6 2008-02-17 11:15:41

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: [Solved] Forcing pacman to reinstall all packages.

Oh I see, isn't pacman clever smile

Offline

#7 2008-02-17 16:09:51

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: [Solved] Forcing pacman to reinstall all packages.

gazj wrote:

Oh I see, isn't pacman clever smile

I can see judd and all pacman dev's smiling internally at this ego boost.

... and another nice tip I must remember.

Offline

#8 2008-02-18 04:59:47

Som_Gye
Member
Registered: 2008-02-17
Posts: 2

Re: [Solved] Forcing pacman to reinstall all packages.

Awesome, thank you both. Everything seems to be in working order again.

And to be honest, I did check the man pages before coming here, but I never made the connection between querying the package database and listing installed packages, though in retrospect this seems obvious. I blame being in all-out panic mode.

Thanks again.

Offline

Board footer

Powered by FluxBB