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

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

相关推荐
小安运维日记2 小时前
Linux云计算 |【第四阶段】NOSQL-DAY1
linux·运维·redis·sql·云计算·nosql
CoolTiger、5 小时前
【Vmware16安装教程】
linux·虚拟机·vmware16
学习3人组6 小时前
CentOS 中配置 OpenJDK以及多版本管理
linux·运维·centos
厨 神6 小时前
vmware中的ubuntu系统扩容分区
linux·运维·ubuntu
Karoku0666 小时前
【网站架构部署与优化】web服务与http协议
linux·运维·服务器·数据库·http·架构
geek_Chen016 小时前
虚拟机共享文件夹开启后mnt/hgfs/下无sharefiles? --已解决
linux·运维·服务器
(⊙o⊙)~哦7 小时前
linux 解压缩
linux·运维·服务器
牧小七8 小时前
Linux命令---查看端口是否被占用
linux
鸡鸭扣9 小时前
虚拟机:3、(待更)WSL2安装Ubuntu系统+实现GPU直通
linux·运维·ubuntu
友友马9 小时前
『 Linux 』HTTP(一)
linux·运维·服务器·网络·c++·tcp/ip·http