3

I keep running low on disk space on my Ubuntu install, and I'd like to fix this without reinstalling / losing data (this is the laptop I use for class and I have all my dev environments working etc, so I'd prefer not to have to set everything up again). I see some other questions related to this, but I'm not sure how specific the solution will be to my system or set up.

$ lsblk
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0   100M  0 part /boot/efi
├─sda2   8:2    0    16M  0 part 
├─sda3   8:3    0 203.6G  0 part /media/calvin/967071017070E8FF
├─sda4   8:4    0 238.2G  0 part /media/calvin/Linux
├─sda5   8:5    0   499M  0 part 
└─sda6   8:6    0  23.4G  0 part /var/snap/firefox/common/host-hunspell
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           1.6G  2.6M  1.6G   1% /run
/dev/sda6        23G   22G  431M  99% /
tmpfs           7.8G  425M  7.4G   6% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/sda1        96M   31M   66M  32% /boot/efi
/dev/sda4       239G   97M  239G   1% /media/calvin/Linux
/dev/sda3       204G   37G  168G  18% /media/calvin/967071017070E8FF
tmpfs           1.6G  8.1M  1.6G   1% /run/user/1000

Disk Usage Analysis screenshot: https://i.stack.imgur.com/Gxblf.png

A similar question I came across: Low disk space on Filesystem root despite having plenty of space in `home`

Could someone point me towards the best/correct method of fixing this? Let me know if there is any more info I can provide that would be helpful.

CalPal
  • 33
  • 5
  • Added, thank you! – CalPal Oct 21 '22 at 03:34
  • It seems the sda6 partition is where most of my data is going, which I've done some googling on but I'm pretty new to ubuntu and linux in general so had trouble zeroing in on the issue and/or best solution. – CalPal Oct 21 '22 at 03:36
  • You only have a 23 GB root partition (analogous to C drive in Windows. It is the place all software in Ubuntu are stored), which is not enough. Take a backup, repartition the drive with at least 50 GB space for the root partition, and reinstall Ubuntu there. – Archisman Panigrahi Oct 21 '22 at 03:36
  • Thank you, that is very helpful. I'm assuming by backup you mean just the files / folders I want to keep (as opposed to being able to backup the entire root partition somehow)? I was kind of hoping I would not need to reinstall everything and re set up my dev environment, but maybe just wishful thinking. Thank you again. – CalPal Oct 21 '22 at 03:43
  • @user535733 Done :) – Archisman Panigrahi Oct 21 '22 at 05:02

3 Answers3

4

The minimum system requirements for Ubuntu Desktop call for 25GB of space for the root file system.

Your current root partition is 23GB. This is insufficient to meet the minimum requirements.

You have several other partitions with free space but this free space cannot be utilized by your root file system because the space is on a different partition.

You should make sure your backups are in order, then repartition the disk, which will erase all of the data. Then reinstall the operating system.

Even though the minimum requirements are 25GB, it would be wise to allocate more space if you don't want to have this problem again. Depending on how you use your system, this 25GB could fill up easily.

You don't need to add any extra partitions to install Ubuntu. The installer will create additional partitions if required.

If you are not planning on sharing data with any other operating system installed on this device, then it's probably not a very good idea to create data partitions if your only reason for doing so is for organization. Use folders for organization, not partitions. This will ensure that free space can be utilized effectively. Otherwise, partitioning creates hard, inflexible limits on how the space can be used. If you're not sure, use the default installation options.

Nmath
  • 12,333
3

You only have a 23 GB root partition (analogous to C drive in Windows. It is the place all software in Ubuntu are stored), which is not enough.

Take a backup of your important files, repartition the drive with at least 50 GB space for the root partition, and reinstall Ubuntu there.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • 50 GB is not enough. I used to think my 48 GB for my Ubuntu was excessive. Snap has changed all of that and now I'm regularly getting low disk size warnings. I've spent significant amounts of time trying to reduce the size of root and avoid resizing that partition. But I've come to realize it's a losing battle and I need a bigger root. – Dan Aug 07 '23 at 23:12
  • Or get rid of snap :) – Archisman Panigrahi Aug 08 '23 at 01:40
  • I use Kubuntu 23.04 on a Chromebook has 32 GB of internal storage. I got rid of snap, and it works quite well – Archisman Panigrahi Aug 08 '23 at 01:41
  • Like you both, I've started to remove snap packages in favour of flatpak with positive outcomes. But this isn't the place for that discussion. – Dan Aug 24 '23 at 15:54
0

just FYI to anybody dealing with a similar issue, I was able to do fix this using a Gparted Live USB: https://gparted.org/liveusb.php

I wouldn't recommend going this route unless you're tech savvy and are adamant against re-installing Ubuntu, as it was a bit of a hassle, but if you follow the instructions to create the Live USB (I found it easier to create the USB on Windows than on Ubuntu), then boot from the Live USB on your Ubuntu machine, and then follow the set-up instructions for Gparted, you can move / resize your root partition and un-allocated space partitions as you please. I think this method is a bit more risky, but I was happy with the results.

CalPal
  • 33
  • 5
  • I did this recently to my laptop (one drive, dual boot with windows and bitlocker) and desktop (dual boot, one drive for each OS). If you're dealing with Windows partitions, I'd recommend using Windows's disk manager to resize Windows partitions. You'll need to also disable a number of things like shadow volumes, restore points, etc.. For every other operation (moves, ext moves, etc.), a live USB Clonezilla is amazing. I increased both my root partitions to 96GB so I don't need to think about it again for a long, long time. – Dan Aug 24 '23 at 16:05