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

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

相关推荐
一人の梅雨29 分钟前
淘宝店铺全量商品接口深度开发:从分页优化到数据完整性保障
linux·windows·microsoft
Voyager_41 小时前
Linux服务器NAS挂载:Truenas
linux·运维·服务器
liujing102329291 小时前
Day01_Linux移植基础
linux·运维·服务器
小狗爱吃黄桃罐头2 小时前
正点原子【第四期】Linux之驱动开发学习笔记-5.1 设备树下的LED驱动实验
linux·驱动开发·学习
叶凡要飞2 小时前
linux安装google chrome 谷歌浏览器
linux·运维·chrome
清静诗意2 小时前
在 Ubuntu 上通过 Docker 与 Docker Compose 部署项目的完整指南
linux·ubuntu·docker
企鹅虎2 小时前
linux内核驱动开发视频课程
linux
Clownseven3 小时前
如何用Fail2ban保护Linux服务器?防止SSH暴力破解教程
linux·服务器·ssh
源码部署23 小时前
linux内核驱动开发视频课程
linux
无敌最俊朗@4 小时前
Linux 进程创建与控制详解
linux·运维·服务器