Low disk space on filesystem root - how to fix this?

brusko651

New Member
Credits
32
Hi,

I installed Ubuntu a few months ago and I made the root partition 20GB, which is more than what was recommended based on some online tutorials.
However, now I am getting this message "Low disk space on filesystem root", and it appears that more than 19 GB of the 20 GB are full.
What could be filling up the file system and how can I fix this issue?

For additional information, here is my output from "df -h"

Code:
Filesystem      Size  Used Avail Use% Mounted on
udev             16G     0   16G   0% /dev
tmpfs           3,2G  2,2M  3,2G   1% /run
/dev/sda7        19G   17G  581M  97% /
tmpfs            16G  479M   16G   3% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/loop2      384K  384K     0 100% /snap/gnome-characters/550
/dev/loop1      2,5M  2,5M     0 100% /snap/gnome-calculator/748
/dev/loop0       98M   98M     0 100% /snap/core/10126
/dev/loop3      355M  355M     0 100% /snap/pycharm-community/211
/dev/loop4      2,5M  2,5M     0 100% /snap/gnome-calculator/826
/dev/loop5      180M  180M     0 100% /snap/skype/156
/dev/loop7       98M   98M     0 100% /snap/core/10185
/dev/loop6      9,5M  9,5M     0 100% /snap/bobrossquotes/88
/dev/loop8      1,0M  1,0M     0 100% /snap/gnome-logs/100
/dev/loop9      291M  291M     0 100% /snap/vlc/1620
/dev/loop10     162M  162M     0 100% /snap/gnome-3-28-1804/128
/dev/loop11      45M   45M     0 100% /snap/gtk-common-themes/1440
/dev/loop12     2,3M  2,3M     0 100% /snap/gnome-system-monitor/148
/dev/loop14     163M  163M     0 100% /snap/chromium/1350
/dev/loop13     384K  384K     0 100% /snap/gnome-characters/570
/dev/loop15     1,0M  1,0M     0 100% /snap/gnome-logs/93
/dev/loop16     163M  163M     0 100% /snap/chromium/1362
/dev/loop17     356M  356M     0 100% /snap/pycharm-community/214
/dev/loop18     218M  218M     0 100% /snap/gnome-3-34-1804/60
/dev/loop19      63M   63M     0 100% /snap/gtk-common-themes/1506
/dev/loop21     2,3M  2,3M     0 100% /snap/gnome-system-monitor/145
/dev/loop20     256M  256M     0 100% /snap/gnome-3-34-1804/36
/dev/loop22     9,3M  9,3M     0 100% /snap/bobrossquotes/104
/dev/loop23     163M  163M     0 100% /snap/gnome-3-28-1804/145
/dev/loop24      56M   56M     0 100% /snap/core18/1885
/dev/loop25     291M  291M     0 100% /snap/vlc/1700
/dev/loop26      55M   55M     0 100% /snap/core18/1880
/dev/sdb2       961G   72M  912G   1% /hdd
/dev/sda5       2,7G  122M  2,5G   5% /boot
/dev/sda9       215G   56G  149G  28% /home
tmpfs           3,2G   16K  3,2G   1% /run/user/121
tmpfs           3,2G   48K  3,2G   1% /run/user/1000
 


captain-sensible

Well-Known Member
Credits
7,388
/dev/sda7 19gig is root ?

and home /dev/sda9 wow 215gig ,you might have been more generous
/dev/sdb2 external hard drive ?


any chance of a scrren shot using gParted of your hd . I picture is worth many terrabytes of text
 

brusko651

New Member
Credits
32
Hi,

here's the screenshot from gParted (in fact two screenshots since I couldn't get all columns on one screen)

screenshot_gparted1.png

screenshot_gparted2.png


My PC has both a 480 GB SSD and a 2 TB HDD built in.
It is set up as dual boot Windows / Ubuntu. Here is the view from the Windows disk manager:

windows_disk_manager.PNG


Now, you may be wondering, why my screenshot from Ubuntu has such low resolution. This is because I tried to update an Nvidia driver and it failed (probably because no disk space) and now the Nvidia driver is no longer working, and I only get this 640 x 480 resolution.

I also seem to be unable to install or uninstall anything:

impossible_to_install_software.png


Trying the command suggested by the above Software Updater error message:

Code:
[email protected]:~$ sudo apt-get install -f
[sudo] password for clemens:
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  efibootmgr libfwup1 libllvm9 libnvidia-extra-440
  linux-hwe-5.4-headers-5.4.0-42
  linux-hwe-5.4-headers-5.4.0-45
  linux-hwe-5.4-headers-5.4.0-47
  linux-hwe-5.4-headers-5.4.0-48
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnvidia-compute-440
The following packages will be upgraded:
  libnvidia-compute-440
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
97 not fully installed or removed.
Need to get 0 B/20,9 MB of archives.
After this operation, 85,0 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 325160 files and directories currently installed.)
Preparing to unpack .../libnvidia-compute-440_440.118.02-0ubuntu1_amd64.deb ...
Unpacking libnvidia-compute-440:amd64 (440.118.02-0ubuntu1) over (440.100-0ubuntu0.18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-440_440.118.02-0ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-allocator.so', which is also in package libnvidia-extra-440:amd64 440.100-0ubuntu0.18.04.1
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-compute-440_440.118.02-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Trying to remove cuda in order to free some space:

Code:
[email protected]:~$ sudo apt remove cuda
Reading package lists... Done
Building dependency tree     
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnvidia-decode-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is to be installed
 nvidia-driver-440 : Depends: libnvidia-compute-440 (= 440.118.02-0ubuntu1) but 440.100-0ubuntu0.18.04.1 is to be installed
                     Recommends: libnvidia-compute-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-decode-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-encode-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-ifr1-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-fbc1-440:i386 (= 440.118.02-0ubuntu1)
                     Recommends: libnvidia-gl-440:i386 (= 440.118.02-0ubuntu1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Code:
[email protected]:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  efibootmgr libfwup1 libllvm9 libnvidia-extra-440
  linux-hwe-5.4-headers-5.4.0-42
  linux-hwe-5.4-headers-5.4.0-45
  linux-hwe-5.4-headers-5.4.0-47
  linux-hwe-5.4-headers-5.4.0-48
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnvidia-compute-440
The following packages will be upgraded:
  libnvidia-compute-440
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
97 not fully installed or removed.
Need to get 0 B/20,9 MB of archives.
After this operation, 85,0 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 325160 files and directories currently installed.)
Preparing to unpack .../libnvidia-compute-440_440.118.02-0ubuntu1_amd64.deb ...
Unpacking libnvidia-compute-440:amd64 (440.118.02-0ubuntu1) over (440.100-0ubuntu0.18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-440_440.118.02-0ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-allocator.so', which is also in package libnvidia-extra-440:amd64 440.100-0ubuntu0.18.04.1
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-compute-440_440.118.02-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Now, the thing is, when I installed Ubuntu, I read in several places that 15GB should be enough for the root partition because it will pretty much only contain the operating system. That's why I assigned only 20GB for this partition.
 

Condobloke

Well-Known Member
Credits
4,983
At some time you will need to be doing some sort of "repair" work to sort this problem out.

Do you have Timeshift installed and set up or do you have backups available ?
 

Condobloke

Well-Known Member
Credits
4,983
If you have data/pics/music etc that you need/can’t replace.... then l suggest you make a backup of them .....even dragging and dropping to an external hard drive will be sufficient to save them, should something go wrong.
Making alterations to partitions etc is dangerous, especially if you have no experience with that sort of operation....and even if you have.
As mentioned, a separate HD will take care of documents/pics etc.....and Timeshift will be enough to safeguard the operating system.

If you have sufficient expertise to use one of the many backup programs to take care of both areas, then that’s fine of course.

If you need help with Timeshift, just ask.
 

sam444

Member
Credits
318
In 6 yrs of running Mint, I've never had this problem because I don't create a Partition for Root.

When I install Mint or any other Distro I always choose, "Erase Disk and Install Linux". On a 500GB HDD or SSD (my favourite size Drive) this gives me one Partition for Root (the Operating System) and this works just fine.

I don't know why people seem to think you need to create a small Partition for Root, maybe it was necessary years ago with Swap and Ram problems but those days are long gone. I don't create a Swap Partition either as it's also not necessary as I have 16 GB of Ram.

How to solve this problem is very simple, install the Distro to the Whole Drive and you can also apply some simple maintenance every few months...Deleting all but two Timeshift snapshots, Removing excessive Kernels and of cause moving large files to an External HDD from time to time works too and don't forget never fill the Drive up as you should have at least 20% of space free so the Drive can work efficiently.

You can also use some Terminal Commands to clean the Distro, you never need to defrag a Linux Distro because Linux doesn't fill your Drive with the Crap Windoze does and never defrag an SSD as that will kill it.
 

Nelson Muntz

Active Member
Credits
2,279
When I install Mint or any other Distro I always choose, "Erase Disk and Install Linux".

this gives me one Partition for Root (the Operating System) and this works just fine.


How to solve this problem is very simple, install the Distro to the Whole Drive and you can also apply some simple maintenance every few months...Deleting all but two Timeshift snapshots, Removing excessive Kernels and of cause moving large files to an External HDD from time to time works too and don't forget never fill the Drive up as you should have at least 20% of space free so the Drive can work efficiently.

You can also use some Terminal Commands to clean the Distro,
Yep I used to create all of the separate partitions and realized it's unnecessary since I save anything and everything of importance to other media.

I don't bother using timeshift as it's extra maintenance like removing all of the extra unnecessary backups / snapshots.

I use the simple already built in cleaning commands in the terminal to remove the little bit of unnecessary crap.

These ways are what works for me and my computers and may not work for other users so find what works best for you and stick with it.
 

Condobloke

Well-Known Member
Credits
4,983
so find what works best for you
I’ll second that!!.....I find Timeshift works for me....because I don’t have all the unnecessary snapshots to get rid of....Why? I hear you ask....because I don’t use the scheduler to take daily, weekly, monthly snapshots.

Instead I take ‘on demand’ snapshots as and when necessary.....one a fortnight maximum, and I delete one each time I take a new one (the only exception here is if there is some event that necessitates taking an ondemand snapshot )
Easy as falling out of bed.
 

Nelson Muntz

Active Member
Credits
2,279
I’ll second that!!.....I find Timeshift works for me....because I don’t have all the unnecessary snapshots to get rid of....Why? I hear you ask....because I don’t use the scheduler to take daily, weekly, monthly snapshots.

Instead I take ‘on demand’ snapshots as and when necessary.....one a fortnight maximum, and I delete one each time I take a new one (the only exception here is if there is some event that necessitates taking an ondemand snapshot )
Easy as falling out of bed.
There's the difference.
You've learned the how to of Timeshift.

Perhaps I go back and revisit Timeshift and learn more about it as it appears to have better documentation nowadays than when I tried it years back.
 


Members online


Top