LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   rm -r /var/log - oops - pkgtool package list gone (https://www.linuxquestions.org/questions/slackware-14/rm-r-var-log-oops-pkgtool-package-list-gone-525680/)

technomeister 02-05-2007 02:15 AM

rm -r /var/log - oops - pkgtool package list gone
 
as title suggests :rolleyes:

i'm guessing there's no way to get them back?

duryodhan 02-05-2007 02:53 AM

I dont thnk so ... lol
lol
lol

anyways remember :
alias rm = rm -i

:D

technomeister 02-05-2007 03:25 AM

It's a stupid place for them to be kept anyway - since when did deleting log files break an application? they aren't even strictly log files, they're configuration files and should be stored in /etc (or even /root) accordingly :confused:

Quote:

Originally Posted by duryodhan
alias rm = rm -i

that could come in handy...

drumz 02-05-2007 03:59 AM

I did that once...

One thing you can do is "reinstall" everything by using installpkg. Instead of merging in the *.new files in /etc, you can just delete them (because they're already current). The trickiest part is packages you installed via installpkg that aren't official packages.

Good luck.

technomeister 02-05-2007 05:01 AM

yea, i've not got anywhere near a full Slackware install though - i'd spent ages figuring out which packages were essential, to have the slimmest possible system. A few non-official packages are in there, most of which I can remember though.

I'm thinking of a script that would scan the contents of all the official packages, then check the system for those files to build a list of installed packages, which could then be used to installpkg what was needed...

time to get that scripting for dummies book out I think.

uselpa 02-05-2007 06:06 AM

technomeister, don't you have any backup?

LittleA 02-05-2007 06:22 AM

Quote:

Originally Posted by technomeister
as title suggests :rolleyes:

i'm guessing there's no way to get them back?

Why do you want them back ? Chances are you won`t need them anyway ...

technomeister 02-05-2007 06:57 AM

no backups - i'd never bothered up until now since this is only my second clean install of Linux, and having to do it all again might not be such a bad thing since i'm still learning what the best way of working is. It's a good point though, and now that i've got a pretty customised system which works well, i think now might be the time to start making them.

Quote:

Originally Posted by LittleA
Why do you want them back ? Chances are you won`t need them anyway ...

Most of them, probably not. I'm sure i'll eventually need to upgrade some packages with newer versions though, some of which I may have to compile from source, and from past experience it's best to remove all traces of an old version rather than just installing a new one over the top and hoping for the best...

LittleA 02-05-2007 08:42 AM

Quote:

Originally Posted by technomeister
Most of them, probably not. I'm sure i'll eventually need to upgrade some packages with newer versions though, some of which I may have to compile from source, and from past experience it's best to remove all traces of an old version rather than just installing a new one over the top and hoping for the best...

Right, and my past experiences tells me you don`t need them, they just make live on a Slack-machine a little more simple.
But, if you really want to install a new one ( even stuff compiled from scratch ), what is keeping you of installing just that one(1) package again and promptly remove it after you installed it, before you install the fancy new things ? :scratch:

technomeister 02-05-2007 10:08 AM

yea you're right... i'm probably being overly pedantic, and it would make things simpler, with no easy way to remove any more packages just to see if I could minimalise things any further and then ending up breaking things :)

ludist 02-05-2007 05:26 PM

You need the name of the installed packages in case of upgrading, because you need to REMOVE them. It's not a problem to not remove them, but you are going to have some wasted disk space.

On the other hand a scenario: You want to upgrade from Slackware 10.2 to Slackware 11. koffice-1.5.2 is replacing koffice-1.4.1. After the upgrade you "should" remove old koffice since some (few in that case) files are in /usr/doc

In last resort you can remove the package from cd with removepkg /cd_path/koffice-1.4.1_bla_bla.tgz

or (if have the nerves, or a backup) you can issue removepkg /old_slack_dvd_path/..../packages/*.tgz AFTER the FULL-FORCED upgrade (upgradepkg --reinstall). removepkg have some IQ and it will not remove packages that exists in other packages. So, it seems that you will be safe.

Excuse the capitals :-)

H_TeXMeX_H 02-05-2007 06:59 PM

Well, you can recover files that you've just deleted, however, by the time this reaches you it will be too late ... oh well :D

Alien_Hominid 02-06-2007 12:37 AM

What fs is yours?
There are some recovery tools for ext2, as well some for ext3.
If you have windows, you can even recover there.


All times are GMT -5. The time now is 07:08 PM.