-1

I've allocated 30GB to Ubuntu when installing, but I'm recently getting a warning saying file system is running out of space Due to this my system is running slowly.

The results of df -h are:

Filesystem      Size  Used Avail Use% Mounted on
udev            1.6G     0  1.6G   0% /dev
tmpfs           330M  1.9M  328M   1% /run
/dev/sda6        29G   26G  1.7G  94% /
tmpfs           1.7G     0  1.7G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.7G     0  1.7G   0% /sys/fs/cgroup
/dev/loop0      128K  128K     0 100% /snap/bare/5
/dev/loop1      9.2M  9.2M     0 100% /snap/canonical-livepatch/126
/dev/loop2      9.0M  9.0M     0 100% /snap/canonical-livepatch/132
/dev/loop3      220M  220M     0 100% /snap/code/93
/dev/loop4      220M  220M     0 100% /snap/code/94
/dev/loop6      112M  112M     0 100% /snap/core/12941
/dev/loop5      111M  111M     0 100% /snap/core/12834
/dev/loop7       56M   56M     0 100% /snap/core18/2284
/dev/loop8       62M   62M     0 100% /snap/core20/1376
/dev/loop9       56M   56M     0 100% /snap/core18/2344
/dev/loop10      62M   62M     0 100% /snap/core20/1405
/dev/loop11     219M  219M     0 100% /snap/gnome-3-34-1804/72
/dev/loop12     248M  248M     0 100% /snap/gnome-3-38-2004/87
/dev/loop13     219M  219M     0 100% /snap/gnome-3-34-1804/77
/dev/loop15      66M   66M     0 100% /snap/gtk-common-themes/1515
/dev/loop14      45M   45M     0 100% /snap/snapd/15314
/dev/loop16      51M   51M     0 100% /snap/snap-store/547
/dev/loop17      66M   66M     0 100% /snap/gtk-common-themes/1519
/dev/loop19      89M   89M     0 100% /snap/xournalpp/69
/dev/loop20      44M   44M     0 100% /snap/snapd/15177
/dev/loop18      55M   55M     0 100% /snap/snap-store/558
/dev/loop21     249M  249M     0 100% /snap/gnome-3-38-2004/99
/dev/sda1       256M   34M  223M  14% /boot/efi
tmpfs           330M   44K  330M   1% /run/user/1000
/dev/sda4       701G   26G  675G  
karel
  • 114,770
Vamshi
  • 1
  • 1
  • There is no way for us to know why, unless you tell us. I can guess that you may need more space. There is also no way for us to know what what you did "when installing...". Why not just tell? Lastly, thank you for not posting images of text. Text is way better. – mikewhatever Apr 18 '22 at 04:11
  • 2
    The recommended minimum for a Ubuntu Desktop install has been 25GB since Ubuntu 17.10, but we don't know what release & system you're asking about. You only allocated 5GB beyond that minimum which likely isn't enough for your use-case. We don't know whether you're asking about a Server install, Desktop install, nor what software packages (if any) you added, what type of packages etc. which all impact how much space (beyond the minimum) you allocated. https://help.ubuntu.com/community/Installation/SystemRequirements – guiverc Apr 18 '22 at 04:18
  • Please let us know which Ubuntu version have you installed on your system. Also, the way you partition your disk depends on your requirements. However, you can always check out this ideal disk space recommendation by Ubuntu community. Considering that you're facing issues with your root partition, please check out the solution from these two threads: - https://askubuntu.com/questions/57994/root-drive-is-running-out-of-disk-space-how-can-i-free-up-space - https://askubuntu.com/questions/585689/low-disk-space-in-root-filesystem-error Please let us k – Manu Mathur Apr 18 '22 at 03:59
  • its Ubuntu 20.5 LTS – Vamshi Apr 18 '22 at 05:18
  • And I allocated 30GB of space. – Vamshi Apr 18 '22 at 05:18
  • We do prefer including text, not images. So keep doing it this way in the future. The only reason to post images is to show something that is not text. – vanadium Apr 18 '22 at 07:37
  • Try and see if logfiles could be the problem - please include output of: sudo du -h --max-depth=1 /var/ – Artur Meinild Apr 18 '22 at 09:00
  • 1

2 Answers2

1

Only you can know because you are the user of the system. You will need to investigate what is taking the space, and then clear the space. There is no one-fits-all answer here: how to cleanup will depend on what is taking the space.

The tool Disk Usage Analyser, that comes installed with the standard Ubuntu desktop, can help easily to identify which directories occupy most of the space. The command line tool du also allows to see that on the terminal.

  • If your user data, i.e. all data under the directory /home, are on that same partition, then the solution is easy: move user data out to other partitions to free space. You can tell /home is on the same partition if, in disk analyzer, there is no separate "device" for /home. (Next to your personal home directory, you will see at least one device for / when you start the program).
  • In the terminal, execute sudo apt clean. That will temporarily release a little space by deleting downloaded installation packages
  • In the terminal, execute sudo apt autoremove. That should remove all packages that are not anymore needed, but also remove old kernels: the latter can release 0.5 GB (which is about what a kernel needs) or more. After running this command, check the number of installed kernels with the command dpkg --list | grep linux-image. Appart from linux-image-generic, there should be no more than two linux-image-<version>... packages. If there are more, then you can manually remove the oldest ones, keeping the current kernel and the one but last.
  • System logs can become very large, especially (paradoxically) in a situation of low disk space. Methods to safely clean logs and keep their size limited are provided here, along with many other safe cleaning tips.
  • You may have an exceptionally large number of packages installed. For regular packages installed using the APT system, the incremental space used per packages is usually limited. However, snap packages take up significantly more space. While it is difficult to fill 30 GB with apps, if you managed to, then consider removing applications you do not use.
vanadium
  • 88,010
0

Use NCDU utility to investigate what is taking up your space and remove trash files

sudo apt install ncdu 
sudo ncdu

it is extremely user friendly and helpful