5

I was working on exporting and backing up my Ubuntu 18.04 WSL2 instance (under Windows 10 Insider Preview 1903 (18950.1000)) and saw it took almost 50 GB of data. This is much higher than I expected.

ubuntu as seen in Apps and Features

Looking at this question I installed and ran ncdu with the following command: sudo ncdu --exclude mnt.

I received the following results, nowhere near 50 GB worth of space being used:

3.7 GiB [##########] /usr
2.9 GiB [#######   ] /home
453.1 MiB [#         ] /var
200.7 MiB [          ] /opt
52.5 MiB [          ] /lib
17.8 MiB [          ] /sbin
15.9 MiB [          ] /bin
12.6 MiB [          ] /etc
612.0 KiB [          ]  init
552.0 KiB [          ] /boot
400.0 KiB [          ] /tmp
16.0 KiB [          ] /lost+found
4.0 KiB [          ] /lib64
4.0 KiB [          ] /ssh
4.0 KiB [          ] /srv
4.0 KiB [          ] /snap
4.0 KiB [          ] /root
4.0 KiB [          ] /media
4.0 KiB [          ] /run

Where is all this extra storage consumption coming from?

4
  • Are you sure you are running Windows 10 version 1903? The build number you indicated, does not match the build number you are suppose to have, 18950.1000 is a build number for an Insider Preview build of 20H1 from July 2019. Please edit your question to clarify the details surrounding your problem.
    – Ramhound
    Oct 28, 2019 at 16:00
  • 1
    did you use sudo or were you logged in as root? ncdu can't scan if your user can't access the directories
    – HoD
    Oct 28, 2019 at 16:04
  • 2
    If you are indeed running that build, I can almost gurantee the problem is due to the fact your running an Insider Preview build, with an early version of WSL 2. If you are indeed running that build, I would either patch it to the current build and uninstall/reinstall the instance, or reinstall Windows 10 1903. In other words, I suspect Windows ,is not reporting the correct size
    – Ramhound
    Oct 28, 2019 at 16:05
  • 1
    @Ramhound Looks like you were correct. I updated to a newer version of windows, and NCDU started to report a more accurate file size. Turns out there was about 40 gigs of hanging docker images laying around :) Oct 29, 2019 at 13:57

1 Answer 1

2

Also note it's on a virtual dynamic disk and the space taken will not shrink. So even after removing files the virtual disk it self will not shrink. Only what the linux file system sees.

0

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.