0

I decided to let go of postgreSQL today and ran the uninstaller as well as deleted rm /etc/postgres-reg.ini that the uninstaller says you have to remove manually. Now I cannot remember what the other file to remove manually was. Furthermore I read online that one should rm -rf /Library/PostgreSQL but I seem to not have that folder on my MacBook Pro (Monterey 12.2.1). The third and last problem is that I have a postgres folder in /Users/postgres that is not found in Users and Groups (neither on login window) in system settings and I cannot use rm -rf /Users/postgres either, so I am lost on how to handle that.

2
  • Why can't you run rm -rf /Users/postgres?
    – nohillside
    Feb 25, 2022 at 12:27
  • Permission denied, I was really stupid at the time as I did not consider using sudo rm -rf /Users/postgreswhich did the job... I did this late at night so I was probably not focused enough to think of that basic command. Feb 26, 2022 at 15:41

1 Answer 1

0

Until a better answer comes along I have a few hints: postgresql file names are often something like: postgres, psql, postgresql, so you could look for those on your file system with the find command:

sudo su 
find / -iname "p*sql" 2> /dev/null
find / -iname "postgre* 2> /dev/null
rm -rf /Users/postgres

Explaination:

  • sudo su let's you become the root user (be very careful), which gives you permissions to look into directories your normal user isn't allowed to (it also allows you to delete system relevant files and destroy your system)
  • find / searches for files starting in your root directory /
  • -iname this option let's you specify the name of the file you are looking for in a case insensitive way.
  • 2> /dev/null redirects any error messages to the dummy file /dev/null
1
  • I did use sudo to successfully remove the directory. Also, the search commands were really good and useful but did not find anything to delete, but thanks anyways. I accept your answer :) Feb 26, 2022 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .