My dpkg database is hosed!
June 26, 2006 2:41 PM Subscribe
My Debian package database is a mess! How can I reset its state?
So I made an attempt to use the Debian Backports and it didn't go so well. To cut a long story short, dselect (and aptitude) now want to uninstall about 90% of my installed packages. In dselect, they're marked as:
Installed?: installed
Old mark: remove
Marked for: remove
How can I reset the state of the dpkg database, basically tell it "if it's installed, leave it alone"?
"X" just seems to undo changes you've made in this session, so that's no help. There's also "R" to revert to the state before this list, which doesn't help either.
For what it's worth, synaptic sees all the packages in the correct state.
I'm hoping for a smart solution before I head off into a couple of hours of manually resetting this stuff.
So I made an attempt to use the Debian Backports and it didn't go so well. To cut a long story short, dselect (and aptitude) now want to uninstall about 90% of my installed packages. In dselect, they're marked as:
Installed?: installed
Old mark: remove
Marked for: remove
How can I reset the state of the dpkg database, basically tell it "if it's installed, leave it alone"?
"X" just seems to undo changes you've made in this session, so that's no help. There's also "R" to revert to the state before this list, which doesn't help either.
For what it's worth, synaptic sees all the packages in the correct state.
I'm hoping for a smart solution before I head off into a couple of hours of manually resetting this stuff.
Have you tried removing backports from your sources.list and then apt-get update; apt-get dist-upgrade ?
posted by beerbajay at 3:09 PM on June 26, 2006
posted by beerbajay at 3:09 PM on June 26, 2006
(I stopped using dselect after a few of these incidents and just use apt-get directly now)
posted by beerbajay at 3:10 PM on June 26, 2006
posted by beerbajay at 3:10 PM on June 26, 2006
You could pin individual packages, but that would be tedious, at best.
When I've done similar things, I've gone with something like what beerbajay suggested - clean up /etc/apt/sources.list, then apt-get update && apt-get upgrade, then apt-get dist-upgrade (answering "no" if it wanted to uninstall anything I use). Rinse and repeat roughly daily until the system is back to some kind of stability.
I have up on dselect years ago. The developers can pry apt-get from my cold, dead hands.
posted by QIbHom at 4:51 PM on June 26, 2006
When I've done similar things, I've gone with something like what beerbajay suggested - clean up /etc/apt/sources.list, then apt-get update && apt-get upgrade, then apt-get dist-upgrade (answering "no" if it wanted to uninstall anything I use). Rinse and repeat roughly daily until the system is back to some kind of stability.
I have up on dselect years ago. The developers can pry apt-get from my cold, dead hands.
posted by QIbHom at 4:51 PM on June 26, 2006
Does this help?
posted by mbrubeck at 8:52 PM on June 26, 2006
- Start aptitude
- Highlight the "Installed Packages" line.
- Press "+".
posted by mbrubeck at 8:52 PM on June 26, 2006
Response by poster: I delved into /var/lib/dpkg/status as Freaky suggested. There were still a couple of conflicts after I modified the status of the affected packages, but those could be sort out by hand afterwards. Thanks everyone!
posted by ciaron at 12:22 AM on June 27, 2006
posted by ciaron at 12:22 AM on June 27, 2006
This thread is closed to new comments.
You will, of course, make backups first; it's been a good few years since I've hacked about with dpkg.
posted by Freaky at 2:52 PM on June 26, 2006