You are not logged in.
Pages: 1
Don't ask me way But I think it was a bad idea!! Is there a smart way to recover my system. Reinstalling all my packages will do, but then I will probably forget some some.
Offline
Hi There
You could look in /var/log/pacman.log to get a history of packages installed. grep for "install" and "upgrade".
Offline
U deleted /var/lib/pacman but why you want to recover your system? because you destroyed that folder contents? if yes, then no u don't need such thing, just do pacman -Sy and the contents will get back there...
[My Blog] | [My Repo] | [My AUR Packages]
Offline
U deleted /var/lib/pacman but why you want to recover your system? because you destroyed that folder contents? if yes, then no u don't need such thing, just do pacman -Sy and the contents will get back there...
no... when you delete that directory, your deleting local database (records of what you have installed) along with repo databases which can be restored from a pacman -Sy.
Your best bet now is to search google for a way to resore that deleted directory or reinstall the entire system. Like you said, going back and reinstalling the packages probably won't get them all.
Offline
Yes its back, but it look like pacman has lost it memory of what packages is installed. I know there is updates waiting for me, but a -Syu does not detect them! Here is an example, this is written i bash:
root@home:~# pacman -Q bash
Package "bash" was not found.
The root of the problem may be somthing else, but it occured at same time i removed the files.
Edit: Posted at the same time as Penguin, from what he said this does not look good :?
Offline
the longer you mess with that directory the less chance you have of restoring anything.
Offline
I like iKevin's idea. It would still take a bit of work, but as an example, try this:
grep -r installed /var/log/pacman.log | cut -d " " -f 4 | sort
and you'll get an alphabetical list of everything you've ever installed - including dupes, of course, but the sorting makes those easy to spot. You don't need to look for upgraded apps, because you'll be installing the latest versions anyway. You could do a similar grep for removed apps, and cross-reference them, or you could just reinstall everything, and then remove what you don't want when your system is back in shape.
Maybe some bash wizard around here would have some ideas about getting rid of the dupes.....
Offline
log rotation?
Arch keeps 4 copies of each log file from logrotate running as a cronjob, and after the fourth the next is deleted. It would be fine and dandy to use the log files as long as you are sure they are still there...
Offline
Maybe some bash wizard around here would have some ideas about getting rid of the dupes.....
Pipe it through uniq after?
Offline
Thanks for the tips, but now I'm just finished doing a clan install. Parsing the logs might have worked, but i didn't feel like messing alot around. Installing Arch is easy and fast, so I did it the safe way
Offline
log rotation?
Good point - although pacman.log is not being rotated on any of my 3 machines. A config issue for me, I presume, although I actually like it that way.
Cerebral - that's cool. Things like this are the reason I love linux, but also the reason I'm not a bash wizard. I wouldn't even know uniq was there except for this thread! Thanks.
Sorry, lessthanjake - going OT here - must stop.
Glad you're sorted out, anyway, although if you ask me, it was just getting interesting.........
Offline
Pages: 1