How to uninstall GitLab

GitLab Logo

You might want to uninstall GitLab completely and all its data and I’ll show you how!

    *******************************************************************
    * * * * * * * * * * *       STOP AND READ       * * * * * * * * * *
    *******************************************************************
    This command will delete *all* local configuration, log, and
    variable data associated with gitlab.

    You have 60 seconds to hit CTRL-C before configuration,
    logs, and local data for this application are permanently
    deleted.
    *******************************************************************

And of course, this will delete everything!

sudo gitlab-ctl uninstall
sudo gitlab-ctl cleanse
sudo gitlab-ctl remove-accounts

Now uninstall either gitlab-ce or gitlab-ee with your package manager:

sudo dpkg -P gitlab-ce

Now, you just need to delete the remains:

rm -rf /opt/gitlab*
rm -rf /var/opt/gitlab*
rm -rf /etc/gitlab*
rm -rf /var/log/gitlab*

And of course, remove the entries from your apt sources!

rm /etc/apt/sources.list.d/runner_gitlab-runner.list*
rm /etc/apt/sources.list.d/gitlab_gitlab-ee.list*
rm /etc/apt/sources.list.d/gitlab_gitlab-ce.list*

You can then refresh the package sources with apt update.

And that’s all there is to it!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.