PDA

View Full Version : Regenerate the apt configuration files



gnarvaja
12-18-2004, 11:16 PM
I had nice fine tuned HD installation. I was trying to create a new Knoppix configuration to remaster and cleaning up my HD installation at the same time --> DO NOT TRY! :cry: I typed apt-get remove <package> in the wrong terminal window and the dpkg/apt configuration files became useless, so did my installation.

I already tried to regenerate them using different methods and none worked. Anyone has a surefire recovery method for these files short of backing up all the configuration files, home directories, etc and reinstall Knoppix?

-- GN

CrashedAgain
12-19-2004, 12:30 AM
before you do a total reinstall, try removing/repacing apt; it's just another package like everything else. My first thought would be 'dpkg-reconfigure apt'. If that didn't work, 'apt-get -t unstable install apt'. If that no go, download the apt package manually then remove (purge) & reinstall it wirth dpkg.

gnarvaja
12-20-2004, 12:51 AM
before you do a total reinstall, try removing/repacing apt; it's just another package like everything else. My first thought would be 'dpkg-reconfigure apt'. If that didn't work, 'apt-get -t unstable install apt'. If that no go, download the apt package manually then remove (purge) & reinstall it wirth dpkg.

These are the only ideas I didn't try. I'm not sure if I would've succeded. Probably if I used the 'force' options. Apparently dpkg requires some of the files to pre-exist with some minimum content. at some point the files got deleted and completely out of sync with the installation. dpkg kept saying something like 'debonf missing or not installed' (something along those lines) and aborted.

I finally had to reinstall :cry: and I'm being a lot more carefull now while updating the packages I need. I looked around the web and found absolutely no detailed documentation or clues on dpkg's configuration files. There was an old script at some forum which I tried and didn't work. The only thing left was to look into the source code.

Since Knoppix has been such a success with all my family (they'd rather use Knoppix than Windows), I have another PC that I don't mind crashing and reinstalling as many times as necessary. It might take some time, but I'll test your ideas. If they work it might be worth documenting. The biggest criticism I found for Debian on the web are these configuration files.

Thanks

--GN