sudo apt-get autoclean
This will delete all packages not currently installed. If that doesn't free up enough space, then use sudo apt-get clean
. This clears out all .debs
downloaded and/or installed.
But it looks like your harddisc is out of space. Seriously out of space. 61Mb is not enough for a good working systen. I found 2 alternatives that can circumvent space related problems though both might be hard to pull of when using a virtual machine.
A more permanent sollution would be to increase the size of your virtual machine (and I would also advice to use the method that allows the machine to dynamically to increase in size; VirtualBox has such a setting).
Alternative if you have a partition or external storage.
With this method you re-route the location where .deb
s are stored:
sudo mv -i /var/cache/apt /media/{dir_of_mounted_disc}
sudo ln -s /media/{dir_of_mounted_disc}/apt /var/cache/apt
Run the upgrade and install. After you are done you can switch back to normal with:
sudo apt-get clean
sudo unlink /var/cache/apt
sudo mv /media/{dir_of_mounted_disc}/apt /var/cache
Ofcourse {dir_of_mounted_disc} needs to be change to the name of your mounted disc.
Another alternative
This way you create a RAM disc:
sudo mkdir /media/{directory}
sudo mount -t tmpfs tmpfs /media/{directory}
sudo ln -s /media/{directory}/apt /var/cache/apt
Clean up as with the 1st alternative.
Warning this requires a large amount of RAM so may not be useable when using a virtual system.