How to: Fix stuck package manager (Yum/add-remove programs)

Joined
Aug 19, 2008
Messages
55
Reaction score
0
Maybe I'm the first to get this problem, but probably I won't be the last. I managed to get my RPM database into such a state that package managers wouldn't work - they'd just get stuck. Probably I killed a package manager process that seemed to be stuck but wasn't, and it left the database in a bad state. Google helped, though, here's what needs doing:

Code:
su - 
rm -f /var/lib/rpm/__db* 
rpm -vv --rebuilddb
yum clean all
[code]

This gets rid of the corrupted database files and rebuilds the rpm database. If yum complains about another process having lock on yum.pid, do an rm /var/run/yum.pid if you're sure you don't have another package manager running.

Edited for typo, thanks for pointing it out, tafelpoot
 
Many and Thanx for posting this!!!

I made a small correction,
I had to type rpm --rebuilddb (no - between rebuild and db)

so the code is:
Code:
su -
rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb
yum clean all

thanx again for the helpfull tip!
 
Hi

Just wanted to say a massive THANX for this.... having never had a working pirut from my refurbed aa1 from day1 i had spent many hours of searching this forum and others to no avail, i was just about ready to go thru the palava of reinstalling linpus by usb drive, just to get package manager working again! (not to mention then having to remove the linpus desktop all over again!!).
 
Hi I'm new user of Linux and have same problem with pirut and pup, both applications start but then hang. They cannot be closed with usual methods and both have everything greyed out. I have tried the above fix
su -
rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb
yum clean all

But stll have same problem. Anyone have any ideas on next step

Many thanks
 
Im having the same problem as mcornish, Ive ran the script but I can't open package manager
 

Latest threads

Back
Top