How to cleanup large gitlab prometheus/data in Omnibus/Docker setting

In many of my dockerized Gitlab instances, the prometheus/data folder was eating up multiple Gigabytes of hard drive space even though I was not using Prometheus at all.

In order to fix this, I first disabled Prometheus in theĀ docker-compose.yml config using

prometheus_monitoring['enable'] = false

Also seeĀ How I reduced gitlab memory consumption in my docker-based setup for a detailed explanantion.

After that, you need to restart gitlab in order for the settings change to take effect.

Now you can just delete the Prometheus data folder. Make a backup of the entire gitlab data folder before this step.

Run this command from within your gitlab data folder:

rm -rf prometheus/data