Troubleshooting & Help ‐ Common procedures ‐ Docker cleanup - MarechJ/hll_rcon_tool GitHub Wiki

🧭 You are here : Wiki home / Troubleshooting & Help / Common procedures / Docker cleanup


CRCON uses Docker to bring its own complete working environment, so you don't have to worry about installing or maintaining anything it needs (Python, PostgreSQL, Redis, Django, Nginx, etc) to run it on your machine.

Distributing an application using Docker relies on "images" and "containers" files downloads.
For each new release of CRCON, we ask you to "pull" new versions of these on your machine.

You may also have built some local Docker containers and images if you're using custom scripts or code in CRCON.

As time passes, Docker's data folder can get quite large, mostly being filled with replaced containers, images or build cache you'll never use again.

Here's a procedure you can apply to clean Docker's data folders.

[!WARNING] This maintenance procedure will DELETE unused and unlinked Docker datafiles.
You can't really loose anything important, as this won't affect your CRCON database or config files.
Still, you'll be advised to always have a fresh backup of a known-to-be-working CRCON install.

If you're using Docker to run other things than CRCON,
make sure to have a known-to-be-working backup for each of them.

0. Enter an SSH session on your VPS

See this guide to get into a SSH terminal prompt.

[!NOTE] We'll assume you have installed CRCON in its default /root/hll_rcon_tool folder, following the installation guide.
Adapt the commands given below if necessary.

1. Make sure CRCON is up and running

This isn't mandatory, but will prevent the deletion of any container, image, volume or network CRCON is actually using.
If CRCON isn't up at the moment you're asking Docker to clean itself, you may loose files that will have to be recreated on the next CRCON start.

Check if CRCON Docker containers are up and running :

cd /root/hll_rcon_tool
docker compose ps

You should get something like this : 399178463-57413dd2-91f1-4bd3-bd18-864a1cb4fffe

If CRCON or one of its containers isn't up, try to restart :

docker compose up -d --remove-orphans

If CRCON or one of its containers still isn't up, look for help in Common issues and their solutions.

2. Ask Docker to clean its data folders

Reference : https://docs.docker.com/reference/cli/docker/system/prune/

docker system prune -a -f --volumes

It will display volumes, images, build cache, etc names as they're deleted.

At the end, you'll get a report telling you how many storage space has been freed.
If you're using CRCON since a long time, this can be counted in GBs !

[!NOTE] If you're building your own CRCON images, the next building process will take some time, as all the cached building data has been deleted.