Created
August 20, 2018 03:04
-
-
Save puppywang/7e357ee38ec466653140c1b4a9f2c1e6 to your computer and use it in GitHub Desktop.
Complete remove gitlab new version and install old version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
#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 213 | |
#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 | |
yum remove gitlab-ce -y | |
#Furthermore, gitlab-ce uses these directories (as described here 368) | |
# /opt/gitlab holds application code for GitLab and its dependencies. | |
rm -rf /opt/gitlab | |
# /var/opt/gitlab holds application data and configuration files that gitlab-ctl reconfigure writes to. | |
rm -rf /var/opt/gitlab | |
# /etc/gitlab holds configuration files for omnibus-gitlab. These are the only files that you should ever have to edit manually. | |
rm -rf /etc/gitlab | |
# /var/log/gitlab contains all log data generated by components of omnibus-gitlab. | |
rm -rf /var/log/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 368 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment