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

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

相关推荐
问简43 分钟前
【共享盘】ubuntu、windows
linux·windows·ubuntu
小生不才yz1 小时前
Shell脚本精读 · S13-01 | POSIX sh 与 Bash:语法对照表
linux
阿拉斯攀登2 小时前
平台设备驱动:platform bus 与设备树
linux·嵌入式硬件·嵌入式·linux驱动·字符设备驱动
阿拉斯攀登2 小时前
并发与同步:自旋锁、信号量、互斥锁
linux·网络·嵌入式硬件·linux驱动·字符设备驱动
网络小白不怕黑2 小时前
10.邮件服务器搭建并脚本实现监控httpd状态
linux·运维·服务器
Carlos_Xu3 小时前
Linux基础-基础命令
linux
风曦Kisaki3 小时前
# Linux实战笔记-HIS项目实战Day01:版本控制与Git基础
linux·笔记·git
jsons14 小时前
rocky8内网离线批量补丁(你之前搭建的架构,多台服务器首选,无订阅)
linux·运维·服务器
阿拉斯攀登5 小时前
SPI 设备驱动开发
linux·驱动开发·嵌入式硬件·linux内核·嵌入式·linux驱动·spi
阿拉斯攀登5 小时前
定时器与延时:内核定时器、hrtimer 与延时函数
linux·嵌入式硬件·linux内核·嵌入式·linux驱动