I have sufficent memory , but somehow I get my /dev/loop0 showing usage of 9 GB here's my df-h.

Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       12G   10G  1.4G  88% /
udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           785M  904K  784M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.0G  1.9M  2.0G   1% /run/shm
/dev/sda6        20G   14G  6.4G  68% /host
/dev/sdb1       400M  4.5M  395M   2% /media/LABEL1
/dev/sdb2       3.3G  1.9G  1.2G  62% /media/LABEL2
/dev/sda5       175G  142G   33G  82% /media/DATA

I tried checking out what was in there. But that only cause a loadof gibberish to be printed on the terminal following which my system crashed.

Any help would be appreciated.


This loop device is not taking up any space. Image and ISO files can be mounted to this virtual device. With /dev/loop0 being mounted on /, I assume this is a Wubi system? If so, something else is using your space. If this is a Wubi system, /dev/loop0 will show the space left and used on the virtual hard-drive image on the physical hard-drive.

You can use the "du" command to figure out the real file(s) taking your space.


Um, well I can't tell you why, but I can tell you how to fix the problem. Just follow the instructions given by https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk to expand your disk partition for Ubuntu, if you installed Ubuntu using wubi.exe on a Windows OS. Additionally the following terminal (which can be opened by: ctrl+alt+T) commands may (or may not, unfortunately from the information I have available to me I just don't know) free up some disk space:

sudo apt-get autoremove

Then remove any unused kernels by copying and pasting the following commands into terminal.

uname -r

Taking note of all unused kernels. (The most recent kernel, (i.e. the one with the biggest number) will be the one you're using at the moment) Then when you're sure as to which kernel you're going to remove type the following:

sudo apt-get purge linux-image-x.x.x.x-generic

Where x.x.x.x refers to the linux kernel you're trying to remove.

  • 2
    Im actually interested in getting my lost space back ,ratherthan allocating more space! – seeker Nov 4 '12 at 19:04

I cannot add a comment on the above answers because of my low reputation so I add here a new "answer" (which actually isn't). According to Devyn Collier Johnson we can use "du". It does not produce any result for me:

du /dev/loop0
0   /dev/loop0

I still do not know why/where/how I am using almost all the space. I also tried to resize it. Since I do not have a live CD/USB I tried a "live resize" (https://help.ubuntu.com/community/ResizeWubiDisk) but when doing:

sudo losetup -c /dev/loop0/
loop: can't set capacity on device /dev/loop0/: Not a directory

In conclusion: I cannot go in either way. I can't neither delete unused/unwanted stuff or enlarge /dev/loop0/. I hope someone can help!

Update: I tried to do the "live resize" again and I do not why this time doing "sudo losetup -c /dev/loop0/" just hang the computer. What I tried is to skip that step and it worked. Now I increased the /dev/loop0 size. However, I still do not know where/how I am using the disk space....

  • Well, /dev/loop0 is not a directory, you shouldn't add a slash after it. I get the same Not a directory error if I repeat your command, but if I drop the trailing slash, I get: ` $ losetup /dev/loop0 /dev/loop0: []: (/var/lib/snapd/snaps/core_1337.snap)` – arielf Mar 14 '17 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.