1

I am having a problem. I was running out of space and remove varicad2013-en from my system manually. Now when I try to do a system upgrade, the system fails with the following message:

Processing triggers for menu (2.1.46ubuntu1) ... Errors were encountered while processing: varicad2013-en E: Sub-process /usr/bin/dpkg returned an error code (1)

Here is another example:

sudo apt-get purge varicad2013-en
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  varicad2013-en*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 209 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 736444 files and directories currently installed.)
Removing varicad2013-en (2.07) ...
/var/lib/dpkg/info/varicad2013-en.prerm: 8: cd: can't cd to /opt/VariCAD/desktop
dpkg: error processing package varicad2013-en (--purge):

subprocess installed pre-removal script returned error exit status 2 /var/lib/dpkg/info/varicad2013-en.postinst: 57: cd: can't cd to /opt/VariCAD/desktop dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: varicad2013-en E: Sub-process /usr/bin/dpkg returned an error code (1)

When I try to install any package, I get same message, so my machine is stuck in limbo over this package / virus.

I have tried: dpkg --configure -a dpkg --purge varicad2013-en apt-get remove --force varicad2013-en apt-get remove --force varicad2013-en

I get stuff like: Errors were encountered while processing: varicad2013-en E: Sub-process /usr/bin/dpkg returned an error code (1)

or

dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 2

How do I remove the package from the Ubuntu 14.04LTS?

I am think wiping the entire drive.. but.. there has to be an easier answer.

1

I following this post and was able to remove manually: How Do I manually remove malformed Packages?

By editing the file and removing it, it stopped erroring out. sudo vi /var/lib/dpkg/status

1

It's not a virus; it's package you broke by impoper way of trying to remove it. In the future, use sudo apt-get purge varicad2013-en or similar to remove package in the fist place, and you will avoid the problem.

you can fix it in two ways:

  1. (cleaner, but require more work/knowledge) - try fix what it is compalaining about, and then repeat the apt-get purge command. In this case, it's missing /opt/VariCAD/desktop, so you might try sudo mkdir -p /opt/VariCAD/desktop and then repeat the apt-get purge to see if it uninstalls then or throws another error, and then repeat
  2. (easier, buy will leave junk and parts of the package on disk, which will waste space and could be a problem if you want to reinstall it later): edit the /var/lib/dpkg/info/varicad2013-en.prerm and after the first line starting with #! add a line exit 0, and then retry the apt-get purge command. You might need to do the same to .postrm file. This will skip any cleanup the package needed to do when removed. If you opt for this option; it might be good idea to try to install package varicad2013-en again, and then purge it again, so it might do a more proper cleanup second time around.

Anyway, with any of those steps when apt-get purge finishes without errors, you should be able to upgrade your system normally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.