Complete uninstall gitlab-ce from ubuntu 14


#1

Hello,

So I installed gitlab-ce on my Ubuntu server via the instructions to run these commands

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce
And then I did gitlab-ctl reconfigure

I finally was able to stop enough processes to actually apt-get remove gitlab-ce but there is A TON of residual software (Unicorn Server, Redis, Sidekiq, Postgres, etc…) installed on my system under the /opt/gitlab and /var/opt/gitlab directories that are still there.

What is the correct and FULL way to uninstall everything that was installed with the above install script? I don’t want any of the residual software left on my system.

It took me about 20+ minutes to finally stop all the TONS of crap that was running alongside gitlab, to finaly free up my port 80 and re-run my Apache server which was my production web-server that was offline as a result of my regreatble Gitlab install… Its my fault for installing it alongside my production web-server for 5-10 mission critical sites, but I finally was able to restart my apache server without getting port 80 conflict errors - but I have not ofund a way to remove the residual gitlab-ce software off my system.

I did not want to just start deleting those gitlab folders I mentioned above, and corrupting / orphaning the remaining software that (I would assume) was installed into other locations aside from /opt/gitlab and /var/opt/gitlab.

Any help would be much apreciated - because I have a strong suspicion that all those servers will start back up if I ever do a system restart and cause me the same issues.

Is there another script (a sister script to the one I installed Gitlab with - https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh ) that I can use to uninstall everything that it installed initially.

Thanks


#2

This worked for me in Ubuntu 16 and let me install an older version of gitlab: https://askubuntu.com/questions/824696/is-it-fine-to-remove-the-opt-gitlab-directory-manually-after-removing-the-gitl

Remove services
sudo gitlab-ctl uninstall

Clean any data generated by usage of the package
sudo gitlab-ctl cleanse

You may also want to remove any accounts you configured. To do so
sudo gitlab-ctl remove-accounts

Then remove the package using
sudo dpkg -P gitlab-ce

Furthermore, gitlab-ce uses these directories (as described here)

/opt/gitlab holds application code for GitLab and its dependencies.

/var/opt/gitlab holds application data and configuration files that gitlab-ctl reconfigure writes to.

/etc/gitlab holds configuration files for omnibus-gitlab. These are the only files that you should ever have to edit manually.

/var/log/gitlab contains all log data generated by components of omnibus-gitlab.

So, First remove the package recommended way (Even if you need to reinstall it). You can then remove those data using rm safely.

Information found from omnibus-gitlab README page


Uninstall GitLab CE from Ubuntu 18.04
#3

Thank you for your post, I inadvertently installed gitlab on a machine that didn’t have the free disk space for it and it filled the drive to 0 bytes free. After many failed uninstall attempts, this is what finally resolved my issue.

IMHO “gitlab-ctl uninstall” should do as advertised, this almost feels like it needs to be a bug report but just glad it’s over.


#4

Thank GOD. Thank you!

Happy to be rid of this resource hogging POS.