Debian Linux完全卸载gitlab-ce

Debian Linux完全卸载gitlab-ce

在Debian上本地安装了gitlab-ce,维护起来比较麻烦,而且占用了80和443端口

后面想改用docker,就想完全卸载gitlab-ce

卸载服务

shell 复制代码
sudo gitlab-ctl uninstall

清理所有产生的数据,会提示等待60秒,如果想反悔,可以按Ctrl+C

shell 复制代码
sudo gitlab-ctl cleanse

需要等待60秒

txt 复制代码
    *******************************************************************
    * * * * * * * * * * *       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.
    *******************************************************************

移除所有账户

shell 复制代码
sudo gitlab-ctl remove-accounts

卸载软件

shell 复制代码
sudo apt purge gitlab-ce

会提示如下警告

txt 复制代码
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/sv 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/init 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/etc 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/embedded/ssl/certs 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/embedded/service/gitlab-shell 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/embedded/service/gitlab-rails/public 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/embedded/service/gitlab-rails/config 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/embedded/cookbooks 非空,因而不会删除该目录
dpkg: 警告: 卸载 gitlab-ce 时,目录 /opt/gitlab/embedded/bin 非空,因而不会删除该目录

手动删除/opt/gitlab,如果提示权限不足,记得su切换到root用户,这个目录保存着gitlab的主要数据

shell 复制代码
su
cd /opt
rm -fr gitlab

检查/var/opt/gitlab,这个目录保存着gitlab的配置,如果有就删掉

检查/etc/gitlab,这个目录保存gitlab服务信息

检查/var/log/gitlab,这个目录保存日志文件

上面这些目录,如果有就删掉,没有就无所谓

相关推荐
獭.獭.42 分钟前
Linux -- 文件【上】
linux·运维·服务器·进程·pcb
Johny_Zhao3 小时前
Centos8搭建hadoop高可用集群
linux·hadoop·python·网络安全·信息安全·云计算·shell·yum源·系统运维·itsm
杜子不疼.3 小时前
Linux的生态与软件安装
linux·运维·服务器
Tipriest_4 小时前
离线进行apt安装的过程(在只能本地传输的ubuntu主机上使用apt安装)
linux·运维·ubuntu·apt·install·deb
QMCY_jason5 小时前
Ubuntu 1804 编译ffmpeg qsv MediaSDK libva 遇到的问题记录
linux·ubuntu·ffmpeg
不念霉运5 小时前
2025 Gitee vs. GitLab:全面对比与选择指南
gitee·gitlab
水瓶_bxt5 小时前
创建 GitLab Runner 使用CICD自动化部署容器
eureka·自动化·gitlab
什么蜜桃绵绵冰5 小时前
linux易错题
linux·运维·服务器
Mike_Wuzy5 小时前
【Linux】发展历程
linux
嶔某5 小时前
网络:应用层
linux·服务器·网络·c++