Centos PostgreSQL卸载

卸载原因

刚开始装 postgresSql 未关注版本,看了下官网,版本已经到了15,想体验一下新版本,所以今天卸载一下

卸载步骤

停掉相关进程

[hui@hadoop201 preserve]$  systemctl stop  postgresql-12
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password: 
==== AUTHENTICATION COMPLETE ===

检查一下

[hui@hadoop201 preserve]$ ps -ef|grep postgres
hui        4323   2298  0 22:13 pts/3    00:00:00 grep --color=auto postgres

卸载

[hui@hadoop201 preserve]$ sudo yum remove postgresql*

删除

[hui@hadoop201 preserve]$ sudo rm -rf  /usr/pgsql*

删除文件

[hui@hadoop201 preserve]$ sudo rm -rf /var/lib/pgsql

删除用户

[hui@hadoop201 preserve]$ sudo userdel -r postgres
posted @ 2023-07-07 10:37  晓枫的春天  阅读(534)  评论(0编辑  收藏  举报