How to Cleaning Up Disk Space in Dom0? (in terminal)

Good afternoon everyone,

I was wondering if there is/are any dom0 cmds to run in terminal to clean & free up space on ssd?

I have been adding and removing template builds and domains a lot lately and my ssd is @ 52% usage. Plus i just want to clean house…

I found this cmd

sudo dnf clean all

But really, that will reclaim disk space for qubes-os in dom0???

It can’t be this easy!!!

note: changed the title a bit. Also bumping.

I use sudo journalctl --vacuum-time=<whatever> all the time, e.g. with whatever as 1s. This cleans the systemd journal, and I’ve seen several GBs being freed up sometimes.

But, other than the systemd journal, I am also curious about what else could be removed to free up space.

1 Like

Can you explain your command a little better

sudo journalctl --vacuum-time=<whatever> all the time,

Shoukdn’t it be
sudo dnf journalctl --vacuum-time=whatever

And what does “whatever” represent?

Hi @B_ryr,

journalctl is not a dnf subcommand, so you would want to run just sudo journalctl ....

The whatever here is the time until which you want to preserve your systemd logs. If you use:

sudo journalctl --vacuum-time=1s

then you would only preserve the logs for the last 1 second, so basically remove all logs.

Note that you can also run this command in TemplateVMs, not just dom0.

1 Like

Hi @padhi ,
If you launch often this vacuum command, then see also the journald setting in the /etc/systemd/journald.conf if you want an automatic cleaning (man 5 journald.conf).

1 Like