You are not logged in.

#1 2007-10-26 09:49:23

Caspian
Member
Registered: 2007-05-22
Posts: 263

Pacman db problem

Being stupid as i am, i accidentaly deleted pacman.db file. Now i have no information on installed packages and pt-pacman-info -i says that there are 0 packages installed. This is all ofcourse logical because there is no pacman.db. How can this problem be solved????

Offline

#2 2007-10-26 10:42:48

kumico
Member
Registered: 2007-09-28
Posts: 224
Website

Re: Pacman db problem

there should be a pacman.db.bak there as well, maybe you can restore the db to soem extent from that

Offline

#3 2007-10-26 14:37:23

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: Pacman db problem

Tx for the post, but my /var/lib/pacman.bak is empty. Don't ask me how or why. Someone please halp me, i really don't have the time for whole reinstalling process....:(

Offline

#4 2007-10-26 14:44:34

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Pacman db problem

I think your only reference will be /var/log/pacman.log then.

Offline

#5 2007-10-26 14:52:23

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: Pacman db problem

Oh no!!!

Offline

#6 2007-10-26 15:23:58

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: Pacman db problem

Never did any programming but learned a little about linux over time. Perhaps one of the programmers could help with a script to re-install all the packages that were installed using pacman.log as a reference. I have come up with a crude script that could give you some idea of the packages to re-install.

grep "installed"  /var/log/pacman.log | cut -d' ' -f4 | sort -u


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

#7 2007-10-26 15:53:37

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: Pacman db problem

This is probably the stupidest thing i've ever done. It wasn't intended, but nevertheless. Seems like i'll end up with reinstalling the whole system from scratch...:(

Offline

#8 2007-10-26 16:02:07

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Pacman db problem

May I suggest

grep -E '\] installed |\] upgraded ' /var/log/pacman.log | cut -d' ' -f4 | sort -u

instead? The above was already fine but didn't account for packages that were installed on the first installation, at least on my system.


1000

Offline

#9 2007-10-26 18:56:30

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: Pacman db problem

Another possibility is to re-install all the packages in /var/cache/pacman/pkg if you have not cleared it.


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

Board footer

Powered by FluxBB