0

My disk space keeps dropping even when I'm not installing anything! Before I had 9.5 GB. 2 days later, it changed to 8.9, another day later 8.2, now 7.9! This is really getting me angry!

What I found interesting is it still says 9.4 in the app "Disk Usage Analyzer" but in Nautilus (File manager), it shows the memory usage. Is the space it shows in Nautilus not real and just a bug and the space is Disk Usage Analyzer the real amount storage I have left or is it the opposite? What I find weird is in Nautilus, when I click properties in the / directory, it says 21.2 used space, 30.6 total capacity. When you subtract 30.6 by 21.2, you get 9.4. That's pretty interesting. By the way, it says 7.9 / 30.6 available // when you click "Other Locations" in Nautilus.

df -h gives me

Filesystem      Size  Used Avail Use% Mounted on
udev            898M     0  898M   0% /dev
tmpfs           186M  1.9M  184M   1% /run
/dev/mmcblk0p1   29G   20G  7.4G  73% /
tmpfs           927M   20M  908M   3% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           927M     0  927M   0% /sys/fs/cgroup
/dev/loop0       87M   87M     0 100% /snap/core/4486
/dev/loop1      155M  155M     0 100% /snap/retroarch/106
/dev/loop2       87M   87M     0 100% /snap/core/4571
/dev/loop3      7.3M  7.3M     0 100% /snap/communitheme/97
/dev/loop5      142M  142M     0 100% /snap/minecraft/11
/dev/loop7      126M  126M     0 100% /snap/discord/52
/dev/loop6      6.0M  6.0M     0 100% /snap/communitheme/124
/dev/loop8       87M   87M     0 100% /snap/simplescreenrecorder/1
/dev/loop4      173M  173M     0 100% /snap/retroarch/113
/dev/loop9       87M   87M     0 100% /snap/core/4407
/dev/loop10     111M  111M     0 100% /snap/minecraft-nsg/13
/dev/loop11     6.0M  6.0M     0 100% /snap/communitheme/185
/dev/loop12     173M  173M     0 100% /snap/retroarch/110
/dev/loop13     135M  135M     0 100% /snap/discord/60
tmpfs           186M   16K  186M   1% /run/user/121
tmpfs           186M  3.1M  183M   2% /run/user/1000
/dev/loop14     135M  135M     0 100% /snap/discord/64

Thanks.

  • 1
    Disk Usage Analyzer may not show some stats for locations, which are available only for root-user. I think the free space decreases because of unattended-upgrades or something similar, and browser cache with other temporary files. You can add output of df -h to the question. – N0rbert May 9 '18 at 22:06
  • I added the output. – agamer569 May 9 '18 at 22:54
  • 4
    I changed your title from "Memory leak" to disk space loss. The former reflects RAM. – WinEunuuchs2Unix May 10 '18 at 0:16
  • 1
    Please run sudo apt install ncdu and post the output of ncdu ~/ – NerdOfLinux May 10 '18 at 0:17
  • 1
    Output of sudo snap list and sudo du --max-depth=0 -m /var/cache/apt? – xiota May 10 '18 at 0:27
2

The discrepancy you are finding between the 2 is a matter of scales. There are many scales used to measure computer storage. For example:

Gibibytes: Gibi 2^30 - 1 Gibibyte = 1,073,741,824 bytes

Gigabytes: df -h print sizes in powers of 1024 however, drive manufacturers refer to capacities using powers of 1000 df -H will provide information in that scale as well. See the examples below:

me@zippy-64bit:~$ df -H /dev/sda2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       113G   11G   97G  11% /
me@zippy-64bit:~$ df -h /dev/sda2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       106G   11G   90G  11% /

As you can see above and below capacity depends not only on how you ask but also depends on who you are and who you ask.

Consider this: from nautilus properties as a regular user I get this:

npropsreguser

You'll note that the Nautilus properties output doesn't agree with either of the df outputs. The clue is (some contents unreadable) but even if you were root there's no guarantee of a match as the method used to calculate usage can vary as evidenced by the output of df vs. du for example. My best advice is to keep an eye on the Use% in your df output as that will always be accurate regardless of the scale in use.

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.