How to uninstall GITLAB

February 20, 2014 53.6k views
How can I remove gitlab from my debian 7 machine. I installed in my machine, but I think I will not use it for now.
7 Answers
I uninstalled it in the following manner, use find to see where gitlab is hiding:
$ find / -iname "gitlab"

Once you find the right folder, try to execute the gitlab-ctl binary as follows:

$ root@centos [/home/ryan]# /opt/gitlab/bin/gitlab-ctl uninstall
ok: down: nginx: 29s, normally up
ok: down: postgresql: 28s, normally up
ok: down: redis: 28s, normally up
ok: down: sidekiq: 27s, normally up
ok: down: unicorn: 11s, normally up
could not find nginx runit pidfile (service already stopped?), cannot attempt SIGKILL...
ok: down: nginx: 29s, normally up
could not find postgresql runit pidfile (service already stopped?), cannot attempt SIGKILL...
ok: down: postgresql: 28s, normally up
could not find redis runit pidfile (service already stopped?), cannot attempt SIGKILL...
ok: down: redis: 28s, normally up
could not find sidekiq runit pidfile (service already stopped?), cannot attempt SIGKILL...
ok: down: sidekiq: 27s, normally up
could not find unicorn runit pidfile (service already stopped?), cannot attempt SIGKILL...
ok: down: unicorn: 11s, normally up
Your config files have been backed up to /root/gitlab-cleanse-2014-04-29T19:05.


The binary location may be different, if you have trouble, post your output to the find script. Good luck!
How did you install GitLab? Did you follow a guide on doing that?
Note, I had to reboot to kill the processes that were currently on. I tried killing them with -9, however this was not a production server so it was worth rebooting.

@ryan629266 I think you need to stop the gitlab services first:

/opt/gitlab/bin/gitlab-ctl stop

Just follow the instructions for uninstalling from the readme file of gitlab here it is in short

Stop gitlab and remove its supervision process

sudo gitlab-ctl uninstall

Debian/Ubuntu

sudo dpkg -r gitlab

Redhat/Centos

sudo rpm -e gitlab

Please help. After installing and uninstalling GitLab, I can no longer use normal git commands. See error below:

$ git clone --bare git@samwise:/srv/git/myapp.git
Cloning into bare repository 'myapp.git'...
sh: 1: /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell: not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

This was working before I installed GitLab. git user has correct public key in .ssh/authorized_keys, etc. I have rebooted the server already. Server: Ubuntu 14.04.5 LTS.

Thanks in advance.

Have another answer? Share your knowledge.