Linux Basics: How To Fix “E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1” In Ubuntu

Today, I got a problem while updating VirtualBox to the latest version.

E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1

Update Manager_001

Solution:

I googled a bit and found the solution. Here is what I did to solve the problem.


sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

This will almost fix the problem.

If you still end up with the same error, then try the following commands:


sudo dpkg --configure -a
sudo apt-get -f install

Or, you can manually download the latest version from Oracle VirtualBox site and install it as shown below.


sudo apt-get update
sudo dpkg -i virtualbox-4.3_4.3.24-98716~Ubuntu~raring_amd64.deb
sudo apt-get -f install
sudo apt-get autoclean && sudo apt-get autoremove

Cheers!