Git | GitLab

GitLab 삭제

비번변경 2021. 5. 28. 09:00

디스크 용량을 확보하기 위해 테스트 목적으로 설치한 GitLab을 삭제하려고 한다.

패키지만 삭제한다고 삭제되지 않기 때문에 아래 과정을 따라야 한다.

 

방법

1. GitLab 서비스 제거

gitlab-ctl uninstall

root 권한을 요구한다.

 

2. 데이터 삭제

gitlab-ctl cleanse

gitlab-ctl cleanse

잠깐 기다리는 시간이 필요하다.

 

3. GitLab 계정 삭제

gitlab-ctl remove-accounts

 

4. 패키지 삭제

# ubuntu
dpkg -P gitlab-ce

# centos
yum remove gitlab-ce

# 다중 명령어로 실행해도 됨
dpkg -P gitlab-ce || sudo yum -y remove gitlab-ce

패키지 버전은 설치한 버전에 맞게 gitlab-ee 또는 gitlab-ce로 지정한다.

 

5. 폴더 정리

rm -rf /opt/gitlab
rm -rf /var/opt/gitlab
rm -rf /etc/gitlab
rm -rf /var/log/gitlab
rm -rf /etc/yum.repos.d/gitlab_gitlab-ce.repo

 

728x90