When doing a release upgrade I get the error:

The upgrade has aborted. The upgrade needs a total of 1,279 M free space on disk '/'.

I used to solve this problem by moving the /var/cache/apt directory to my home partition (which has plenty of space), and then making a symlink to it:

sudo mv /var/cache/apt ~/.
sudo ln -s ~/apt /var/cache/apt

This worked up till 16.04. It appears to no longer work in 16.10.

Does anybody know a way to get around this disk space issue without installing from a USB key or uninstalling packages?

  • Note that his is NOT a duplicate of askubuntu.com/questions/298487/… or askubuntu.com/questions/822973/…, etc. since those posts talk about free space in '/boot' and not '/'. – krumpelstiltskin Oct 14 '16 at 11:26
  • 1
    /etc/apt is not such big folder to help here – Anwar Oct 14 '16 at 11:42
  • @Anwar: sorry, I fixed the typo. – krumpelstiltskin Oct 14 '16 at 11:49
  • You problem is that your disk partition for Ubuntu is way too small, and you're running out of space. Edit your question to include a screenshot of gparted, and I'll see if there's a fix by repartitioning your disk. Cheers, Al – heynnema Oct 14 '16 at 13:21
  • I don't need a bigger partition since I have all the packages I need and there is still 1G of leeway. What I'm looking for is a workaround for the problem of updating the system. I realize that this wouldn't be a problem if I had a bigger '/' partition but my disk is small! – krumpelstiltskin Oct 14 '16 at 13:32

Update after OPs comment

If moving /var/cache/apt to home doesn't help, check that your home partition has enough space. You can also try removing the extra icon themes you installed. A few icon themes can easily eat upto 1GB+ space these days.

Another option is removing older kernels you're not using. Use this question as a help How do I remove old kernel versions to clean up the boot menu?

/etc/apt is not too big a folder to gain you significant improvement on the disk size. On the other hand, You can try moving the /var/cache/apt folder instead to your home and symlinking it, because that one is used to download all those .deb files.

Using your same commands before, you can do this

sudo mv /var/cache/apt ~/.
sudo ln -s ~/apt /var/cache/apt

Of course, You need to remove the folder /var/cache/apt first after mv-ing.

  • I'm sorry! It was a typo. I meant '/var/cache/apt'. – krumpelstiltskin Oct 14 '16 at 11:49
  • @krumpelstiltskin I've added a few more suggestions. what's your / partition size? – Anwar Oct 14 '16 at 12:09
  • /dev/sda5 17G 15G 990M 94% / /dev/sda7 367G 289G 59G 84% /home – krumpelstiltskin Oct 14 '16 at 12:43
  • oh. 17G is too low for /. Use baobab to check which files/directories are much space. – Anwar Oct 14 '16 at 12:46
  • I'm really just curious in getting a workaround for not having a giant '/' directory. I had a workaround that no longer works :(. – krumpelstiltskin Oct 14 '16 at 12:57

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.