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,这个目录保存日志文件

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

相关推荐
路溪非溪8 分钟前
BLE的广播、扫描和连接等工作机制总结
linux·arm开发·驱动开发
我才是一卓29 分钟前
linux 安装简易 git 服务端并使用
linux·运维·git
Wanliang Li38 分钟前
AArch64虚拟化——virtio-mmio实现
linux·虚拟化·virtio·hypervisor·mmio
嵌入式-老费1 小时前
vivado hls的应用(第一个axi接口的ip)
linux·服务器·tcp/ip
旺仔.2912 小时前
Linux系统基础详解(二)
linux·开发语言·网络
x***r1512 小时前
Notepad++ 8.6 安装教程:详细步骤+自定义安装路径(附注意事项)
linux·前端·javascript
big_rabbit05022 小时前
JVM堆内存查看命令
java·linux·算法
王小义笔记2 小时前
WSL(Linux)如何安装conda
linux·运维·conda
偷懒下载原神2 小时前
【linux操作系统】信号
linux·运维·服务器·开发语言·c++·git·后端
源远流长jerry3 小时前
RDMA 传输服务详解:可靠性与连接模式的深度剖析
linux·运维·网络·tcp/ip·架构