Linux CentOS 7 卸载 PostgreSQL
1、查看服务状态并停止服务
systemctl status postgresql
systemctl stop postgresql
2、使用 YUM 命令卸载 PostgreSQL
yum remove postgresql*
3、验证 RPM 包是否卸载干净
rpm -qa | grep postgresql
4、删除 PostgreSQL 数据文件和配置文件目录(非必要)
rm -rf /var/lib/pgsql
PostgreSQL 相关目录位置
- 安装目录默认在 /usr/pgsql-*/ 下
- 数据文件和配置文件目录默认在 /var/lib/pgsql/ 下
(完毕)