Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

newbie needs apt help to remove a program

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
Guest

newbie needs apt help to remove a program

#1 Post by Guest »

Hi all

I have been having difficulties installing Freenx and decided I wanted to remove it completely and start again. Not sure what else I did but if I try to remove it or reinstall I get errors:

Code: Select all

dell:/# apt-get remove -f freenx  --purge
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  freenx*
0 upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 139kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 132547 files and directories currently installed.)
Removing freenx ...
dpkg: error processing freenx (--purge):
 subprocess pre-removal script returned error exit status 1
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 freenx
E: Sub-process /usr/bin/dpkg returned an error code (1)
dell:/#
dell:/# apt-get install freenx
Reading Package Lists... Done
Building Dependency Tree... Done
freenx is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up freenx (0.3.1-2~5.04ubp1) ...
dpkg: error processing freenx (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 freenx
E: Sub-process /usr/bin/dpkg returned an error code (1)
dell:/#
How can I force apt to remove the program or to reinstall over whatever is there?

Thanks

RJ

goweropolis
Posts: 136
Joined: 2004-09-15 21:35
Location: Vancouver, Canada

#2 Post by goweropolis »

What does

Code: Select all

sudo apt-get --purge remove freenx
give you?

http://www.debian.org/doc/manuals/apt-h ... l#s-remove
~ G O W E R O P O L I S ~

Guest

#3 Post by Guest »

Thanks for getting back to me. Basically your command gives the same output as my previous post:

Code: Select all

dell:/# apt-get --purge remove freenx
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  freenx*
0 upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 139kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 132547 files and directories currently installed.)
Removing freenx ...
dpkg: error processing freenx (--purge):
 subprocess pre-removal script returned error exit status 1
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 freenx
E: Sub-process /usr/bin/dpkg returned an error code (1)
dell:/#

goweropolis
Posts: 136
Joined: 2004-09-15 21:35
Location: Vancouver, Canada

#4 Post by goweropolis »

How about

Code: Select all

sudo apt-get -f --purge remove freenx
?
~ G O W E R O P O L I S ~

Guest

#5 Post by Guest »

Nope - that produces the same error/s. Isn't it pretty much what I did on the first line of my first post? I'm not sure if the order of commands makes any difference?

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#6 Post by lacek »

These errors indicate that the pre-removal and post-installation scripts of freenx are broken. They dwell in /var/lib/dpkg/info along with the rest of the package scripts, and are called freenx.prerm and freenx.postinst.

If you have script programming skills, you can try to fix them; if not, you may remove them.
Removing them will allow you to remove freenx, but you can't install it again until this issue is fixed or you repair the script by yourself.

Theorically, by trying to install, waiting for it to fail, then removing the postinst script, and trying to configure freenx, you can have the freenx package, however, the postinst script is usually there for good reason. By removing it, you may miss something that the script was expected to takek care.

Guest

#7 Post by Guest »

lacek - very helpful reply - thanks a lot. As a newbie it seems inconceivable that I could not just remove the last bits of the application and re-install. I had visions of being stuck with a broken freenx forever, or having to re-install debian - just for this :oops:

Anyway - I managed to fix it following your advice (more by luck than judgement):

Code: Select all

dell:/var/lib/dpkg/info/ cp free* /tmp # for safety
dell:/var/lib/dpkg/info/ rm free*
Then I removed freenx. It complained like mad but did it:

Code: Select all

dell:/var/lib/dpkg/info# apt-get remove freenx
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  freenx
0 upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
Need to get 0B of archives.
After unpacking 139kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ...
dpkg: serious warning: files list file for package `freenx' missing, assuming  package has no files currently installed.
132531 files and directories currently installed.)
Removing freenx ...
The I reinstalled and luckily it seems to have worked:

Code: Select all

 dell:/var/lib/dpkg/info# apt-get install freenx
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  freenx
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 0B/32.7kB of archives.
After unpacking 139kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package freenx.
(Reading database ... 132531 files and directories currently installed.)
Unpacking freenx (from .../freenx_0.3.1-2~5.04ubp1_all.deb) ...
Setting up freenx (0.3.1-2~5.04ubp1) ...
Thanks again - what a helpful forum this is :lol:

User avatar
tuxdaemon
Posts: 21
Joined: 2005-09-27 02:14
Location: Southern California
Contact:

Sucks

#8 Post by tuxdaemon »

Sometimes you have to delete the lockfile. Glad you fixed it.

Post Reply