Re: rm /var -> dpkg ???
On Tue, 23 Feb 1999, Bernhard Dobbels wrote:
> Recently, i have done something really stupid: rm -r /var
> and, yes, everything was away, including my /var/backup directory!
> Yes, i know, it's no place for a backup.
> Everyting is restored now.
>
> Just all the info that dpkg put there is away and i cannot run dpkg
> anymore. Is there some kind of rebuilding-tool for recreating the
> database?
Not that I know of, but you might want to cross-reference the output
of "find /" and the Contents-i386.gz file, maybe using awk or some such,
this way you could know the packages you had installed.
"ls /usr/doc" should be also a good starting point, since every package is
supposed to come with an /usr/doc/<package> directory.
This will give you a list of installed packages.
If you want a "clean system" you might want to backup /etc, /home,
/usr/local, etc. and start from scratch. You can use the list of installed
packages and "dpkg --set-selections" to obtain a freshly installed "clone"
of your old system. [ This is probably what I would do, because I'm used
to "clone" my system from time to time, but you might want to try some
other way to solve this ].
Reply to: