zl程序教程

您现在的位置是:首页 >  其他

当前栏目

怎样删除postgresql

2023-04-18 14:24:17 时间

怎样删除postgresql

卸载postgresql

通过以下命令查看已经安装的Postgresql软件包

[root@107 ~]# rpm -qa | grep postgresql
postgresql96-9.6.10-1PGDG.rhel7.x86_64
postgresql96-server-9.6.10-1PGDG.rhel7.x86_64
postgresql96-libs-9.6.10-1PGDG.rhel7.x86_64
postgresql96-contrib-9.6.10-1PGDG.rhel7.x86_64
[root@107 ~]#

可以通过yum remove命令逐个卸载,但最简单的是卸载libs包。因为其他几个包都依赖它,卸载libs包会将其他包一并卸载。

yum remove postgresql96-libs-9.6.10-1PGDG.rhel7.x86_64

由于安装的时候已经将Postgresql作为服务安装,所以还需要删除服务管理脚本。

在此目录下 /etc/init.d/ ;看是否有服务管理脚本。推荐学习《Python教程》。