Disk space on a node

The directory is there am i to remove these files? sorry about the beginner questions (still fairly new to linux)

varlogjournal

Journalctl --disk-usage:
Journal disk usage

I will be upgrading soon!!

type ls -l and I believe the old files are archived already and u can delete them… I am sure there are also more old files inside var/log folder which can be deleted…

1 Like

I periodically clear out my journalctl logs and archived node logs on relays to conserve space. Given enough time, both of these can eat up some significant resources. You could set up a chron job to manage the archived Cardano node logs every 2 weeks or so.

I run this to clear out archived Cardano node logs older than a day:

find /opt/cardano/cnode/logs/archive/ -mtime +1 -name “*.json” -print -exec /bin/rm {} ;

To clear my general journalctl logs older than 2 days, I use the following:

Check the disk usage

sudo journalctl --disk-usage

Rotate the jouurnalctl logs

sudo journalctl --rotate

Remove any logs older than 2 days

sudo journalctl --vacuum-time=2days

1 Like

Freeing up space on Ubuntu is not really Cardano-specific. You find a lot of more or less good resources by just googling a bit.

For example, this was my first result: https://www.cloudbooklet.com/simple-ways-to-free-up-space-in-ubuntu-linux/

So, you don’t have to do it by aggressively removing logs. You could also see if there are too many old packages in the package cache or something like that.

3 Likes