You are not logged in.
Hi!
I had a partition /dev/sda6 mounted as /var, and deleted /dev/sda6 in a LiveCD environment without backing up data in /var.
So, almost all pacman things (database, cache, log, etc) were lost. Now I run 'pacman -Q', it shows nothing.
But, as you know, I do have packages installed. For example, I have an executable /usr/bin/vim while pacman does not think the vim package is installed.
The problem is how to retore pacman's knowledge of whick packages are installed.
I searched the forum, only to find I am the only fool.
Any idea?
Many many thanks!
chi
Last edited by chisiyuan (2010-04-29 07:42:09)
Awesome is awesome.
Offline
I have never had to do anything like this, but the instructions below suggest it's more of a problem if you don't have the log and you may have to do a reinstall.
http://wiki.archlinux.org/index.php/Pac … l_database
Hopefully, someone will have an easier solution.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Maybe you can do something with pkgfile. Like make a list with all files in / , search with pkgfile which package it belongs to and do pacman -S on that things.
Or pacman --asdeps -S
...
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
We all do stupid stuff like this at some point, and then you learn to make backups.
Offline
I searched the forum, only to find I am the only fool.
You're not: http://bbs.archlinux.org/viewtopic.php? … 22#p641222
I had a package list somewhere, which helped. Then again I didn't know about --asdeps, so I reinstalled all packages explicitely and pacman -Rs was worthless for a while.
As a first step I'd do pacman -Sy --force base.
Good ideas do not need lots of lies told about them in order to gain public acceptance.
Offline
I wrote a script for this once: http://bbs.archlinux.org/viewtopic.php?pid=670876
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I just did a fresh installation. It's like starting a new life.
The two things I learn from this accident are that
a. Just like @rwd says, we should make backups
b. We have a filelist called "files" in /var/lib/pacman/local/PACKAGE/. it would be helpful if there were the same thing in /var/lib/pacman/sync/REPO/PACKAGE/.
Anyway, Thanks guys!
@Xyne, your script is interesting except that it's in perl which I know nothing about.
Awesome is awesome.
Offline