1

My Ubuntu machine's root partition is above 80% full.

xxxx@dberc-repo:~$ df -h
Filesystem                          Size  Used Avail Use% Mounted on
udev                                 79G   12K   79G   1% /dev
tmpfs                                16G  1.3M   16G   1% /run
/dev/mapper/dell--dev--02--vg-root  117G   88G   24G  80% /
none                                4.0K     0  4.0K   0% /sys/fs/cgroup
none                                5.0M     0  5.0M   0% /run/lock
none                                 79G  7.0M   79G   1% /run/shm
none                                100M     0  100M   0% /run/user
/dev/sda1                           236M  100M  124M  45% /boot

But I can still see that, there are some other partitions (/run/shm or /run), which have space to spare.

Can anyone suggest how I can allocate some of the free space to my root partition?

Zanna
  • 70,465

1 Answers1

2

You can only resize physical partitions. Please have a look at:

What are "/run/lock" and "/run/shm" used for?

/run/shm is shared memory.

You could use a utility like Disks from the Unity menu to understand the physical disks you have and how they are partitioned.

You might also want to look at what actually uses most disk space and whether you really need all that is there. For example, if the system has been running for a while and been updated again and again, then it is worth having a clear-out in /lib/modules of older kernel modules that you don't actually need any more.

You can check how much space is used by a directory by using the command

du -s /lib/modules

or for any other directory.

Zanna
  • 70,465
  • As i can see /run/shm or /run is having more space & they are enough some kind of temporary file-system. Isn't possible that i can allocate few GB of space to my root partition? If it's so, then could you please guide me the way to do it? – sazzadhussein Aug 18 '16 at 07:14
  • Anyone up there to share any possible update regarding this issue? – sazzadhussein Aug 19 '16 at 06:42
  • You can only resize physical disk space. If you look at Disks then you can see your system's physical disk space. You may decide t0 reduce swap space (which goes into /run/shm together with actual memory). – ClaudiaE Aug 19 '16 at 14:58
  • +1, but just noting that the best way to clear /lib/modules and /boot is to run sudo apt autoremove, unless you are installing kernels manually – Zanna Oct 03 '17 at 06:02