I removed PostgreSQL but i still see it as an installed version? - postgresql

Im trying to uninstall PostgreSQL from my Mac machine. Ive deleted the folder from the Application folder, ran sudo rm -rf after cd'ing to /Library/PostgreSQL/myversion. Emptied my trash bin. Ran brew list and brew uninstall --force postgresql, brew remove postgresql and restarted my machine but after all of this im still seeing postgres (PostgreSQL) 11.8 when running postgres --version in the terminal.
Is this normal? Am i missing anything else? Im clueless now!
Thanks in advance.

Related

Trouble running MongoDB server on macOS Monterey 12.0.1

I've installed MongoDB through Homebrew and when I start the server using brew services start mongodb-community (or mongodb-community#5.0) command it immediately fails and turn the brew services list to error!
I already tried giving permission - using Rosetta to install and run - etc. but ended up with the same error.
The only thing I don't know how do (which might potentially work) is to change the directory of MongoDB, but I am not sure that could be a solution or not!
Unloading and loading launchctl solved the permission issue.
Try running below command after installation of mongodb:
sudo brew services restart mongodb/brew/mongodb-community
Then running sudo brew services list will show the mongodb-commuity service status to started.

pgadmin4 stuck in indefinet loading screen -- Ubuntu 18.04

I am running postgresql in Docker Container. I was connected to it using Pgadmin4 and it was all good until past hour or so and suddenly stopped working. its stuck in loading screen and its not working. I tried to uninstall postgres, pgadmin but nothing really worked.
I used the below commands
sudo apt autoremove pgadmin4
I have postgis installed if that helps
Indefinite loading screen
So I found a work around and thought it would be helpful to anyone who has similar issues.
Ubuntu 18.04
sudo apt remove pgadmin4
sudo rm -rf /home/${USER}/.config/pgadmin
sudo apt install pgadmin4
Hopefully that should work if anyone has a better answer please advice.

Postgres is uninstalled but psql --version still shows a result

I need to install a new Version of psql on a Macbook, after i uninstall pg, i try psql --version and it still says "psql (PostgreSQL) 9.3.5."
Pg 9.6 was installed (not installed with Homebrew). I was able to uninstall 9.6. Still says 9.3.5 is installed. But i cannot find any files belonging to any Postgres application.
Is there any way to uninstall any postgtres application 100%?
There are multiple ways Postgres is installed on a Mac.
Homebrew
EnterpriseDB
Postgres.app
Hence, to uninstall, you need to do that differently.
There are different links and I'll share them here.
Homebrew - brew uninstall postgresql command would do.
EnterpriseDB - https://stackoverflow.com/a/9240197/3413323
Postgres.app - https://postgresapp.com/documentation/install.html
Hope this helps.
This may be because psql depends on postgis service, which requires psql.
If it is via Homebrew, you can run below:
brew uninstall --ignore-dependencies postgresql

Postgresql won't connect to server following re-install in Ubuntu

I am running Ubunutu 14.04. I recently purged postgresql from my system and have re-installed it. The installation seemed successful and the postgres user was created successfully, however, when I attempt to launch psql I get the following error:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Any advice?
Thank you
I removed postgresql 9.4 again and replaced it with the previous version. Everything appears to be working now, though this is a somewhat unsatisfactory solution.
Did you reinstall the postgresql-9.6.x ?
Me too...
You need to uninstall postgresql completely
sudo apt --purge autoremove postgresql*
sudo apt install postgresql-9.6
ubuntu16.04

Full uninstall of Postgresql 9.3.5

I installed postgresql 9.3.5 on OS X 10.9.4. I also used psql postgres to create database etc.
Ran in some issues where postgresql no longer works. The error is:
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
So I brew uninstall postgres. Tried reinstalling but keep getting same error. I looked in the /Library.... and deleted the postgresql folder. Is there a way to fully remove this thing? I'm tempted to reinstall this mac but this is not the way to learn the long way of resolving this issue.
Completely uninstall PostgreSQL 9.0.4 from Mac OSX Lion?
This should work if you had previously used brew to install postgres:
brew uninstall
Double check /usr/local/var/postgres is also gone.
If installed with EnterpriseDB, use the second answer. You might also try it as it seems to be a complete manual uninstall.
Edit: after further review, it seems this is more of an issue with Postgres on OSX where as it defaults to the local installation rather than your installation: PostgreSQL error 'Could not connect to server: No such file or directory'