How to clean the n8n since the disk is full

The size has decreased to 4,59 GB :metal: :metal: :metal:

is it normal total size, about 5 GB ?

I checked mine and is about 3.5GB so idk. For sure is better, but I would say it’s something weird about it

Any other ideas what can be removed or cleaned ?

Anyway, thank you @Shirobachi a lot for your help!!!

show what’s inside /var/libs please

This will remove unused dependences sudo apt-get autoremove about docker give me some time

5974putty_portable

How many containers / images do you run ?
One other machine where I have 5 containers /var/lib take 6GB, now I assume it’s notmal size

Hi @Mikhail,

I couldn’t read whole topic but did you check Docker logs? To prevent larger log files I’m using this command while creating Docker container.

Hope it helps…

1 Like

I don’t quite understand what you mean…

Ji @samaritan Sorry, How can I check Docker logs?

Type: docker-compose logs to see container logs or docker-compose logs | wc -l to count logs

Do you have something else or only n8n?

15

only n8n.

Not bad or logs are checked somehow else, can you help @samaritan

In that case I have no clue what can take that space, maybe at the morning someone with more experience will help. I hope I helped at least a bit

1 Like

Are you kidding me? You just saved my life! :+1: :grinning:
Thank you @Shirobachi so much for your time and help!

1 Like

Hi @Mikhail,

Here is the path of your logs;

/var/lib/docker/containers/<container_id>/

You can find your container id via this command

docker ps

You can delete log files using this command one by one.

rm {logfilename}

After you removed them check your disk space again. If the root cause is log files, you can use the log configuration parameters that I’ve shared above.

They are very small - 1Mb

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d38f4c5eb699 n8nio/n8n “tini – /docker-ent…” 47 minutes ago Up 47 minutes 127.0.0.1:5678->5678/tcp root-n8n-1
af5f6bdc96b7 traefik “/entrypoint.sh --ap…” 47 minutes ago Up 47 minutes 0.0.0.0:80->80/tcp, :::80->80/ tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp root-traefik-1

Can you try following command?

docker ps -f status=exited -q | xargs -r docker rm && docker images -f dangling=true -q | xargs -r docker rmi