# Linux Disk Usage

Linux has a few means to analyze a disk for space usage.

One way, is a package called, ncdu.

It can be downloaded with:

```bash
sudo apt install ncdu
```

You execute it, like this:

```bash
sudo ncdu -x /
```

NOTE: -x forces it to stay within the same filesystem, and not traverse other mounts.

You can add the -r switch, to make it read-only.

When run, it will iterate the filesystem, and create an interactive usage list, like this:

[![image.png](https://wiki.galaxydump.com/uploads/images/gallery/2025-04/scaled-1680-/Qi0OTZifVQdvIi0o-image.png)](https://wiki.galaxydump.com/uploads/images/gallery/2025-04/Qi0OTZifVQdvIi0o-image.png)

#### Clearing Tmp Folder

Ansible likes to push container images and other things into the /tmp folder of its host.

Here’s a quick command to clear temp files that are older than 10 days:

```bash
sudo find /tmp -type f -atime +10 -delete
```