3

When I perform an update, then informed me that I do not have enough disk space.

I have plenty of hard drive space so I just need to increase space on the partition that is allowed for ubuntu to use for operating system and updates.

The error message reads

The upgrade needs a total of 26.7 M free space on disk '/boot'. Please free at least an additional 10.5 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean

I have done sudo apt-get clean and still not enough space.

I have tried sudo apt-get autoclean then sudo apt-get update & sudo apt-get upgrade

enter image description here

A.B.
  • 89,123
  • 21
  • 245
  • 323
UbuntuFan
  • 123
  • 2
  • 3
  • 10
  • Which of them is? Hard disk space or RAM? What is the exact error message? What's the output of `free` and `df -h`? – Braiam Nov 15 '13 at 20:30
  • The error message reads "The upgrade needs a total of 26.7 M free space on disk '/boot'. Please free at least an additional 10.5 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean" I have done 'sudo apt-get clean' and still not enough space. – UbuntuFan Nov 15 '13 at 20:46
  • The best way to add additional information to your question is by editing it, with the *edit* button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself. – Braiam Nov 15 '13 at 20:49
  • We also need `dpkg -l linux-image*` – Braiam Nov 15 '13 at 21:06
  • there's probably some leftovers from earlier upgrades in `/boot`, images and the likes. Some things you can do: use `df -h` to check harddisk space. You say you have plenty, but the partition `/boot` still can be full. Then, check out what is actually in `/boot`, the message is quite clear the problem is there. Maybe we van find something you can remove there? like old initrd stuffs? – Nanne Nov 16 '13 at 14:14
  • plz upload gparted screenshot to `imgur.com` and post the link here. – Avinash Raj Nov 16 '13 at 14:18
  • There is a very good answer [here][1]. [1]: http://askubuntu.com/questions/142926/cant-upgrade-due-to-low-disk-space-on-boot – hadi Apr 28 '14 at 21:49
  • 1
    Possible duplicate of [Can't upgrade due to low disk space on /boot](https://askubuntu.com/questions/142926/cant-upgrade-due-to-low-disk-space-on-boot) – karel Jun 19 '17 at 07:40

5 Answers5

1

I'm going to guess that Update Manager is trying to load a new kernel in /boot and there's not enough room, so we can free up space by removing older kernels.

Firstly and foremost, please be careful.

Let's look at what's in the /boot partition - I'll use Nautilus as Super User from my computer to provide an example.

lkristie@TinMan:~$ sudo nautilus
[sudo] password for lkristie:

This is the procedure I follow when I need space for new kernels.

Open /boot when Nautilus comes up (screenshot below).

Note the tagged objects are all of the same version - delete them; I'd recommend this: free up the disk space you need and that's it.

If you're tempted to do some housekeeping here, understand the impact of whatever it is you decide to do and - if you're not sure - do the required reading before taking any action.

Leland

enter image description here

Leland Kristie
  • 411
  • 2
  • 5
1

Had the same problem with the GUI. Opened a terminal and entered my threefold:

sudo apt-get update; sudo apt-get dist-upgrade && sudo apt-get autoremove

That's worked (But I don't know why :o) ).

JensE
  • 21
  • 1
  • Hmmm... This seem to upgrade the distribution as well ( `sudo apt-get dist-upgrade` ), which isn't included in the question. It's probably a good idea to do, but it isn't something I would advise people to do regardless of anything. I follow [this link](https://gist.github.com/ipbastola/2760cfc28be62a5ee10036851c654600) and did `sudo apt-get autoremove`, but after that `df -h` in the terminal showed that I still had a problem. But by running `sudo update-grub` afterwards, then the capacity dropped from 96% to 55%. – Zeth Mar 23 '21 at 09:35
0

I had a similar problem and another post on a similar topic told me about a utility called Ubuntu Tweak and how to install it from the Terminal. It has solved my problem by removing old kernels and freeing lots of space.

mnsh
  • 5
  • 3
0

Since this is one of the highest ranked Google results and nobody actually answered your question, I figured I'd answer albeit 2 years late.

The first and easiest thing to try is

sudo apt-get autoremove 

This will remove redundant packages to free up space. However, this isn't always a solution if for some reason you did not allocate enough space to the boot partition and you still don't have enough space after removing redundancies. If this is the case:

Install Ubuntu to an external disk (flash stick or similar), then live boot your system from that disk.

Install GParted from Ubuntu Software Center.

Find the partition with mount point: /boot . It will likely show that almost the entire partition is full/used.

Right-click and "resize" partition below /boot partition to create free, unallocated space after the /boot partition.

Right click and resize /boot partition, expanding it on the right into the free space created by resizing partition below.

Shut down, remove live boot Ubuntu drive & restart into your normal desktop environment.

Your boot partition now has more space.

-1

Try:

sudo apt-get autoclean

To get rid of old downloaded packages. Then, try to install the updates:

sudo apt-get update && sudo apt-get upgrade
animaletdesequia
  • 8,306
  • 4
  • 26
  • 43