You are not logged in.
Pages: 1
I made a HUGE mistaked today, I delted my usr directory by accident I meant to do cp -R usr/ / but for some reason I used rm -R like an idiot. So how do I get it back? This is a stupid mistake. Thanks for reading and hope you have an idea.
Offline
what kind of filesystem are you using?
Have a look at this thread for recovering files from a reiserfs partition.
Offline
one thing you could try is pacman -Sc and then pacman -U /var/cache/pacman/pkg/*. That will reinstal all packages and since /usr usually contains only files managed by pacman, should restore it to pristine condition. It won't help with thnigs you've installed or modified locally though.
Dusty
Offline
Awesome, thanks guys. I do use Resiser FS sorry for not including, I was in a bit of a rush when I wrote this post. I'll let you guys know if it that gets me going and I'll append a fix to the title. Thanks again.
Offline
If you have deleted /usr, you can not use pacman, which was in /usr/bin/pacman
Mortuus in anima, curam gero cutis
Offline
If you have deleted /usr, you can not use pacman, which was in /usr/bin/pacman
very true, you'd need to untar the package directly and then grab pacman.static from inside.
Dusty
Offline
I'm still a bit of a noob and I'm not sure how to go about untarring whichever package we're speaking about anyone know where to point me to?
Offline
To untargz a package, just run
tar xzf filename
or, specifically for pacman,
tar xzf /var/cache/pacman/pkg/pacman-2.9.8-1.pkg.tar.gz
You might want to do this in a temporary folder so you don't accidentally overwrite anything in /etc
Offline
To untargz a package, just run
tar xzf filename
umm... I could be wrong, not on my arch box but isn't tar in /usr/bin?
Anyway, best bet would be to fire up a live cd and mount your drives and use the livecds tar to get pacman back.
-Fran
Offline
tar is in /bin
I still think the filesystem recovery procedure is a better route. You have to be sure that if you do a pacman -U /var/cache/pacman/pkg/* that everything in that folder was everything that you have installed. YOu also have to factor in older packages and cleared cache....
Maybe you could do something with pamcan -Q and strip out the versions so you can give it as a list to pacman to reinstall
Offline
Luckily I gave in and took the "easy route" and just reinstalled Arch, I won't make this noobified mistake again, and luckily I hardly had anything on my computer at that moment so all is well, thanks for the great suggestions in case it someday helps someone else out there.
Offline
Pages: 1