Unable to upgrade to Ubuntu 24.04 - Not enough free disk space

I have successfully installed Ubuntu 22.04.5 LTS on my Mac Studio using Vmware. Vmware restricts disk size to 20GB but I have resized the disk to 40GB. I have installed the Gnome Desktop and everything runs fine except when I try to upgrade to Ubuntu 24.04. I receive the message “Not enough free disk space”.
I’ve used Gparted to display an image of my disk layout and it shows 3 partitions:
/dev/nvme0n1p1 fat32 /boot/efi 953MB used: 8MB
/dev/nvme0n1p2 ext4 /boot 1.75GB Used: 193MB
/dev/nvme0n1p3 lvm2pv ubuntu-vg 37GB Used: 17GB

I’m not sure why it needs more disk and not sure how to proceed.

1 Like

Welcome to Ubuntu Discourse.

You appear to be using logical volumes on /dev/nvme0n1p3 so start by checking this:
sudo lvs

This will display the logical volumes within your volume group (ubuntu-vg). Look for the size and available free space in root, home, or other logical volumes.

It is quite likely that in order to proceed Ubuntu needs enough space for the temporary files and packages required for the upgrade.

This might explain the error message.

Also check with this command:
df -hT

You want to make sure root and boot have enough space free.

Post the output back here from the commands if you need more advice and also on next steps if you do need to free up space.

Hope this helps.

Thanks for the quick response.

I tried “sudo lvs” and no response. Also tried “sudo lvs -a” and no response.
When I try “df -Ht” it says “option requires an argument – ‘t’”

Will try “man lvs” and try again.

I tried a restart and the /dev/mapper/ubuntu–vg-ubuntu–lv was not found.

I will reinstall Ubuntu through Vmware and try again.

I’ve reinstalled Ubuntu and Gnome.

Response from “sudo lvs” : ubuntu-lv ubuntu-vg -wi - ao 10.00g
Ubuntu df response
I’ve uploaded the response to “df -hT”

Aren’t you going to run into the same problem again the next time you want to upgrade?

You already have 68% usage on vg-ubuntu.

Is this for testing purposes only?

I would like a larger disk space but the Vmware installer restricts the disk space to 20GB and I can’t work out how to increase this.
I will avoid upgrading until I can increase the disk size. It’s difficult to do this when the disk is in use.

I have never used VMWare but will this not work?

My understanding is that afterwards you would need to boot into Ubuntu and use something like GParted to increase the virtual partition into the newly created space.

Thanks - I will look into this and see if I can get it to work.

You can go settings and manage the disk size and add more disk space it uses default 20GB, but not locked to that just go to VM settings and extend VM disk

Thanks, will try that later. I wasn’t sure if you could set that up before creating a New virtual object.

There doesn’t appear to be a way to extend the VM disk before installing Ubuntu. What I have done is install Ubuntu then extended the VM disk to 50GB. Using Gparted shows that the extra disk is there but not used. I extended the disk to use the extra space - see attachment.

I still receive the error message when attempting to upgrade Ubuntu so need to try other stuff.

Did you forget to resize the filesystem ?

Just resizing the “physical disk” from ouside the OS wont magically make the filesystem occupy all the new space … (check with df -h inside the VM what the OS actually sees)

Not able to resize using the Disks app - option is greyed-out.

Right, this is indeed normal if you are currently running from it … on a physical machine you’d now boot off live media and resize the filesystem from the live session while it is not mounted … perhaps you could achive the same from a VM by adding a live image as CD/DVD ROM and changing the boot order to it to boot into a live session ?

Though it would likely be cleverer if you could simply make it big enough before first boot …

Thanks - will try to get that working.

I have been installing Ubuntu 22.04.5 followed by the Gnome Desktop and then attempting to upgrade to the latest release of Ubuntu.
I am now installing 22.04.5 and upgrading to the latest release before installing the Gnome Desktop.
If that doesn’t work I’ll create a bootable thumbdrive and try booting from that to resize the disk.

Problem solved! Installing 22.04.5 then updating to the latest release, then installing Gnome works.
Thanks for all the helpful suggestions.

2 Likes