permantly removing a program from apt-get
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?
|
That happens from time to time. Have you tried apt-get install -f ?
|
Re: permantly removing a program from apt-get
Quote:
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 :D. 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! :cool: |
Quote:
(Reading database ... 100952 files and directories currently installed.) Removing bootsplash-theme-newlinux ... dpkg: error processing bootsplash-theme-newlinux (--remove): subprocess pre-removal script returned error exit status 10 Errors were encountered while processing: bootsplash-theme-newlinux E: Sub-process /usr/bin/dpkg returned an error code (1) |
Re: Re: permantly removing a program from apt-get
Quote:
Yes I know what file it is that is causing me the headache. I'm d/l it now and will do the dpkg-deb --contents and rm -rf on it when it's done. I usually don't do a manual removal of packages and let apt-get and dpkg do their thing but in this case they didn't work, I believe this is due to the maintainers script, as you said. It was after all from an unstable repo and yes I realise that things often break when you start messing with unstable. The only problem is that I have allready done the rm -f on all the files that should have been installed. They are gone, however dpkg and apt still think that they are there for some reason. |
Quote:
Example prerm script (for seahorse) Code:
#!/bin/sh set -e # Automatically added by dh_gconf if [ "$1" = remove ] || [ "$1" = upgrade ]; then SCHEMA_LOCATION=/usr/share/gconf/schemas SCHEMA_FILES="seahorse.schemas " for SCHEMA in $SCHEMA_FILES; do if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ gconftool-2 \ --makefile-uninstall-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null fi done fi # End automatically added section Code:
#!/bin/sh set -e exit 0 # Automatically added by dh_gconf if [ "$1" = remove ] || [ "$1" = upgrade ]; then SCHEMA_LOCATION=/usr/share/gconf/schemas SCHEMA_FILES="seahorse.schemas " for SCHEMA in $SCHEMA_FILES; do if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ gconftool-2 \ --makefile-uninstall-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null fi done fi # End automatically added section |
sorry was reading that late at night I did it again after a good rest and it worked thanks
|
Quote:
thank you. i've been fking with that for too long this afternoon. mine was an error with bootsplash files on Ubuntu |
All times are GMT -5. The time now is 01:32 PM. |