Quote:
Originally posted by diensthunds
I for some odd reason have a program stuck in my apt-get database and for the life of me can't get rid of it. I have removed the program from the hard drive and all the files that were associated with it (came from the "supposedly installed files that you get when ya select it in synaptic) problem is every time I start synaptic it still tells me I have a broken program. This is a real problem in that I can't use apt-get from the command line. Where's the file(s) that I need to fix to get apt working?
|
diensthunds, any idea as to which package it is that is half-installed/b0rked? If you know the name, one way out of it is to manually download the .deb for this package, issue this command i.e. "dpkg-deb --contents packagename" (WITHOUT quotes), note the files that gets installed and their repsective locations and then manually do a "rm -rf" for each of them.
Next time, do NOT ever attempt to manually remove files belonging to an installed/half-installed package. When on Debian, use the Debian utilities provided apt-get or dpkg to do it. IF you ever need to remove a package and its configuration files COMPLETELY i.e. purged them from your system, type "dpkg -P packagename" (WITHOUT quotes, and where packagename refers to name of problematic package) as root. I suspect the package segfaullted due to a buggy mainatiners' script e.g. preinst, postinst, or postrm. In such instances, you'll need to manually tamper with the particular maintainers' script. I have already explained in another thread i.e. one on Temporary Workaround for seahorse 0.7.6-2 install in Sid shown a quick and easy fix that has saved me arse on numerous occasions.
To save you the trouble of hunting down that thread...here's the fix:
Workaround for seahorse 0.7.6-2 install in Sid
Arising out of an apt-get upgrade session or apt-get install seahorse.
The bug report on this latest version of seahorse as fetched by apt-listbugs seems to indicate that the problem of with regards to its installation/upgrade on Sid has been fixed BUT in reality, it is NOT the case. See below:
Retrieving bug reports... Done
grave bugs of seahorse (0.7.6-1 -> 0.7.6-2) <done>
#296189 - seahorse: Upgrade from 0.7.6-1 to 0.7.6-2 fails.
Summary:
seahorse(1 bug)
dpkg --force overwrite -i /var/cache/apt/archives/seahorse_0.7.6-2_i386.deb
postinst called with unknown argument `upgrade'
dpkg: warning - old post-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
postinst called with unknown argument `failed-upgrade'
dpkg: error processing /var/cache/apt/archives/seahorse_0.7.6-2_i386.deb (--install):
subprocess new post-removal script returned error exit status 1
postinst called with unknown argument `abort-upgrade'
dpkg: error while cleaning up:
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/seahorse_0.7.6-2_i386.deb
nano /var/lib/dpkg/info/seahorse.postrm
insert "exit 0" after "set -e" line (WITHOUT the quotes in BOTH) then type "Ctrl O" to save amendment. Rerun apt-get install seahorse to rid half-installed status of seahorse. Went fine for me i.e.
debian:/home/maximusp/dloads/debs# apt-show-versions seahorse
seahorse/unstable uptodate 0.7.6-2
Do not get to be reliant on cli tools, they still have their limitations e.g. your particular situation
. It's also your only route to salvaging a buggy xserver upgrade (not trying to frighten you but it does occur from time to time
). Best of luck!