You are not logged in.

#1 2008-04-04 10:17:44

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

[Solved] Accidentaly removed pacman "data" files,

I think I accidentaly removed the file/files that contains the data on which packages are installed, is there an command I can use so that pacman can see which packages are installed or such?

Or do I have to reinstall my entire system?

Last edited by Tigertailz (2008-04-04 14:36:30)

Offline

#2 2008-04-04 11:45:05

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: [Solved] Accidentaly removed pacman "data" files,

which file/files would that be?


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#3 2008-04-04 12:00:37

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: [Solved] Accidentaly removed pacman "data" files,

If you removed /var/lib/pacman/local, then you're pooched.  I believe someone on the forums made a script to parse through /var/log/pacman.log to try to figure out which packages were installed on your system, then re-install them all, but I don't know where that thread is.

Offline

#4 2008-04-04 12:26:18

stylopath
Member
Registered: 2007-07-26
Posts: 112

Re: [Solved] Accidentaly removed pacman "data" files,

Well, i face exactly the same problem atm.

Pacman -Q returns nothing, but with pt-pacfix i can see all my installed packages (pt-pacfix is part of the pactools-package on AUR).

Now i don't know how to bring the list of installed fles back to pacman -  does anyone have an idea?

Again: I have a full list of all installed packages, but pacman doesn't. Without this information (pacman now thinks there is no single package installed on my system) i can't use pacman.

When upgrading a package, it complains that the data on the filesystem is already existing.
When installing a package, it complains about missing dependencies

thanks for your help.

Offline

#5 2008-04-04 13:45:51

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [Solved] Accidentaly removed pacman "data" files,

I installed the programs with the force flag, so if I can get a list of installed packages then its ok smile

So now I kinda have the solution, just use the ps-pacfix program and it outputs the list, then you do a

pacman -Sf <the programs of the list>

The problmes is the list is made as the following

kernel
ncurses
firefox

etc

Its not very copy paste friendly, is there a way so i can get the list like

kernel ncurses firefox etc

so I can just paste them after the pacman -Sy command.

My explanation sucks, hope anyone know what I mean

Last edited by Tigertailz (2008-04-04 13:56:00)

Offline

#6 2008-04-04 14:08:51

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1,328

Re: [Solved] Accidentaly removed pacman "data" files,

There is a command - if you do 'pt-pacfix | xargs', it put all the packages on one line.

Be warned - pt-pacfix uses /var/log/pacman.log - so if you delete also that file, you are royally boned.

Offline

#7 2008-04-04 14:19:46

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [Solved] Accidentaly removed pacman "data" files,

Think I solved it, thx for the command bender02,

since there where lots of aur packages I just did

yaourt -Sf <list of files>

Offline

#8 2008-04-04 14:33:50

chicha
Member
From: Nice (France)
Registered: 2007-04-20
Posts: 251
Website

Re: [Solved] Accidentaly removed pacman "data" files,

One thing you could do to prevent this problem to ever happen again is to have an automatic backup in place for important files such /etc /var/lib/pacman/local and /var/log/pacman.log ...

You will find plenty of information on how to do this in the wiki or the forum. For instance using rdiff-backup in a cron will do the trick ...


Mandrake (2001) -> Debian (2002) -> Nasgaia (2003) -> LFS (2004) -> FreeBSD (2004) -> Gentoo (2005) -> Kubuntu (2006) -> Archlinux (2007) -> ?
Will Archlinux finally be THE distro of my dreams ? Time will say, but its on the way cool

Offline

#9 2008-04-04 14:38:08

stylopath
Member
Registered: 2007-07-26
Posts: 112

Re: [Solved] Accidentaly removed pacman "data" files,

well, i already managed the output of pt-pacfix by hand (i ran pt-pacfix >> paclist and then edited it by hand), so i have it copy&paste friendly smile

pacman -Sf is a nice idea, i wonder that i didn't get this idea by myself wink

Since there seems to be no other way, i will have to pacman -Sf [packages] and wait a few hours....

Thanks a lot Tigertailz, bender02 and chicha!

Offline

Board footer

Powered by FluxBB