Re: A tool to clean out packages?
Hi,
>>"Louis-David" == Louis-David Mitterrand <mito@aparima.com> writes:
Louis-David> Recently I reinstalled the whole "base" package from a
Louis-David> rescue disk and thus dpkg no longer sees any of my
Louis-David> previously installed packages. Is there a tool or option
Louis-David> in dpkg to rebuild its database of installed packages or
Louis-David> has everything been wiped out for good?
Well, if you look into /var/lib/dpkg, you should see backup
copies of a file called status. If so, you are in luck.
a) as root, backup the dpkg databases.
# cp -a /var/lib/dpkg /var/lib/dpkg.sav
b) Uncompress a sufficiently old copy of the status file, and copy it
into place. (look at the size of the status.yesterday.?.gz files --
after the replacement of the base, the size should have dropped
significantly)
# cp /var/lib/dpkg/status.yesterday.5.gz /tmp
# gunzip /tmp/status.yesterday.5.gz
# cp /tmp/status.yesterday.5 /tmp/status
# mv /var/lib/dpkg/status /var/lib/dpkg/status.sav
# cp /tmp/status /var/lib/dpkg/status
Cross your fingers ...
manoj
__> ls -asCF /var/lib/dpkg
total 5274
1 ./ 0 predep-package
1 ../ 672 status
1 alternatives/ 672 status-old
998 available 654 status.yesterday.0
998 available-old 204 status.yesterday.1.gz
1 cmethopt 203 status.yesterday.2.gz
2 diversions 199 status.yesterday.3.gz
2 diversions-old 199 status.yesterday.4.gz
69 info/ 198 status.yesterday.5.gz
0 lock 198 status.yesterday.6.gz
0 methlock 1 updates/
1 methods/
--
The desire of a thoughtlessly living man grows like a creeper. He
drifts from one life to another like a monkey looking for fruit in
the forest. 334
Manoj Srivastava <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: