PostgreSQL reinstall ubuntu code example
Example 1: remove postgresql ubuntu
sudo apt-get --purge remove postgresql
sudo apt-get purge postgresql*
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
Example 2: postgresql install ubuntu
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo -u postgres createuser --interactive
sudo -u postgres createdb database1
Example 3: uninstall postgresql mac
$ brew remove postgresql
Example 4: install postgresql ubuntu
sudo apt install postgresql postgresql-contrib