LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 01-07-2007, 08:56 PM   #1
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 653

Rep: Reputation: 42
Question synaptic won't complete unistall of package


Thanks to all.

I can't get synaptic, kpakcage, apt-get, dpkg to complete the removal of the brscan2 package which is part of the drivers for a brother multi-function printer. It was installed using the instructions on the Brother site. I have not been able to get the printer to work, but that is in a different thread. This package removal is part of trying to solve that issue.

When I do # dpkg -purge brscan2, or synaptic,
aptitude, kpackage or,apt-get the uninstall runs ok but returns the error that it can't remove some files/folders because they don't exist.

I actually think this is a problem with the script in the package because the whole package management system is working fine for all other packages.

After any attempted removal of this brscan2 package, before I can do anything else, I have to reinstall the package, as per normal, before the system will go on to something else. Both synaptic and kpackage report the package size as 0 byts. strange. In the installed state all the files from the package seam to be there in the file system. Even the ones that the unistall failuer says are not there.

I have looked and haven't found a posting on this problem. Others that are fixed by the typical reinstall and unistall. My question is that this:

After I do the uninstall w/purge can I just delete the entry in the /var/lib/dpkg/status file to this package?

I know this is not the recomended method, and I would rather use a more conventional method if one exists.

Debian Etch (mostly upto date as of yesterday)
kernel 2.6.16-2-k7

Thanks to the may people who will read this for there help.

Last edited by rbees; 01-07-2007 at 09:01 PM.
 
Old 01-07-2007, 11:33 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Yes, some uninstall scripts seem to be a bit brain-dead when it comes to missing files. Probably there have been changes in the file locations, and the uninstall scripts were not updated correctly, so you have situations where the scripts try to remove something that isn't there anymore.

In these situations you can usually simply use the 'touch' command to create dummy substitutes for the missing files and rerun the uninstall. This generally lets it finish properly. It probably won't work if the script is trying to remove the same file twice or something though.

Apt-get also has a '--force-yes' option that might make it ignore the missing files. I've never tried using it for removal though, so I'm not absolutely sure.
 
Old 01-08-2007, 05:41 AM   #3
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 653

Original Poster
Rep: Reputation: 42
Thumbs down same results

Thanks Dave the H

I still get the same results when I use the --force option. I am posting the results below. (as aside How do I get the output to be in one of those neat scroll boxes I see some times?)

# apt-get --purge remove --force-yes brscan2
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED
brscan2
0 upgraded, 0 newly installed, 1 to remove and 73 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 161584 files and directories currently installed.)
Removing brscan2 ...
rmdir: /usr/local/Brother/sane/GrayCmData/ALL: No such file or directory
rmdir: /usr/local/Brother/sane/GrayCmData/AL: No such file or directory
rmdir: /usr/local/Brother/sane/GrayCmData: No such file or directory
rmdir: /usr/local/Brother/sane: No such file or directory
dpkg: error processing brscan2 (--remove):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
brscan2
E: Sub-process /usr/bin/dpkg returned an error code (1)
#

The out put seams to me to be indicating that the script is trying to remove those folders twice. Yes they do exist when the package is in the installed state. I haven't tried to make a couple of dummy folders an rerunning the script yet. Also I am not familiar with "touch", but making the dummy folders through Konqueror as root should serve the same purpose I suppose.

What if I put an extra read only file in the folder that is not normally there. I have seen that cause the uninstall complete but leave the folder behind for manual removal. Think I will try that first.

Thanks for listening to me ramble on. Sometimes that is the best help.
 
Old 01-08-2007, 06:02 AM   #4
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 653

Original Poster
Rep: Reputation: 42
success

Once again a big thanks to all.

I put an extra text file in both folders and the uninstall script ran to completion. Then all I had to do was manually remove the files and folders. Now I have a couple of symlinks to get rid of and I can start to reinstall the whole driver package for this printer.

Thanks
 
Old 04-04-2007, 12:43 PM   #5
heyubob
LQ Newbie
 
Registered: Jan 2005
Location: Portland, Oregon (baja Canada)
Distribution: Fiesty Fawn-Meets-Brunching-Bear
Posts: 10

Rep: Reputation: 0
Thanks, it worked for me too!

Will this technique work for other troubled packages? Could somebody explain the pitfalls of doing this.

Thank you.
 
Old 04-04-2007, 04:17 PM   #6
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 653

Original Poster
Rep: Reputation: 42
Heyubob,

The only thing I know about is if the script is failing for someother reason. In that case who knows what may happen. Looking at the script should help reveal any potential problems.
 
  


Reply

Tags
apt, aptitude, dpkg, kpackage, unistall


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
synaptic package manager... usien Linux - General 1 01-07-2007 01:51 PM
LXer: Simple Package management with Synaptic Package Manager LXer Syndicated Linux News 0 12-05-2006 06:33 PM
synaptic package manager forcing me to delete a broken package mbman Linux - Software 6 04-25-2006 09:30 AM
unpin a package in synaptic sterrenkijker Debian 2 03-01-2006 02:21 PM
How do i unistall SYNAPTIC? DOLLAR22 Linux - Newbie 0 03-14-2004 12:19 AM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration