/* First stop the postgresql systemctl stop postgresql-13
/* You can use the YUM repository’s yum command to uninstall PostgreSQL on Fedora-based distributions of Linux such Red Hat or CentOS:*/ yum remove postgresql
/*To use a wildcard operator (*) to remove all packages with names beginning with postgres, use the following command:*/ yum remove postgres\*
/*Be sure to remove the pgsql directory as well:*/ rm /var/lib/pgsql
/*You can use the rpm command with the -qa options to grep for any packages that contain “postgres” in their name:*/ rpm -qa | grep postgres
/*If you prefer, you can shorten the search to something like post as well:*/ rpm -qa | grep post