I'm working on a wrapper script for rm
that might break apt-get
part way through processing.
What file(s) do I need to back up first in case apt-get
database gets corrupted?
aptbackuppackage-management
I'm working on a wrapper script for rm
that might break apt-get
part way through processing.
What file(s) do I need to back up first in case apt-get
database gets corrupted?
Best Answer
After some digging,i found out that
apt-get
database is managed bydpkg
From
man dpkg
Also from The Debian FAQ,it says
So if
dpkg
puts its own database in/var/lib/dpkg/status
, that meansapt-get
database and all other package mangers maintained bydpkg
will also be in/var/lib/dpkg/status
.So simply by backing up/var/lib/dpkg/status
(of whichdpkg
already puts its backups in/var/backups/
) will solve your worries of screwing up withapt-get
.