DEV Community

Cover image for How to Check Which Directory Uses the Most #Disk Space in #Linux
scohostings
scohostings

Posted on

How to Check Which Directory Uses the Most #Disk Space in #Linux

Before you begin
You need terminal or SSH access. Use sudo when inspecting directories owned by other users; omit it when checking your own files. If you are already logged in as root, omit sudo.

The commands below target GNU utilities commonly available on Ubuntu, Debian, AlmaLinux, Rocky Linux, RHEL, and Fedora. Minimal containers, BusyBox environments, and other implementations can have different options. Check du --help if an option is rejected.

The inspection commands do not delete data. Installing the optional ncdu package changes the installed software on the system.

Click here to read more about Linux: Find Which Directory Uses the Most Disk Space

Top comments (0)