PostgreSQL is useful for coding, however you may wish to uninstall it out of your Mac sooner or later. In comparison with regular macOS apps, which you’ll be able to delete in Finder, eliminating PostgreSQL is a little more tough. However worry not as a result of I’ll present you what it is advisable do at present.
To make sure that you take away all the pieces, let’s delete your consumer account as properly. And if you happen to’re struggling to take away the app or your account, you’ll additionally discover out what you are able to do to handle these adjustments.
Causes to Uninstall PostgreSQL on Your Mac
Whereas PostgreSQL is a helpful piece of software program, you may now not want to make use of it since you’ve picked an alternate. Nevertheless, it’s additionally doable that the app isn’t working for no matter motive; uninstalling and reinstalling packages that aren’t appearing as they need to typically make it simpler to resolve the difficulty.
NOTE
How one can Uninstall PostgreSQL on Your Mac
No matter your causes for desirous to uninstall PostgreSQL in your Mac, the method is an identical. First, you’ll must delete the app. And after doing that, you must delete your consumer account.
Within the sections beneath, you’ll learn to do each.
1. Use the Terminal App
Time wanted: 10 minutes
One of many fundamental methods to uninstall PostgreSQL in your gadget is through the Terminal app. You’ll should enter a few completely different instructions, and I’ll present you the complete course of from begin to end beneath.
- Go to Highlight by clicking on the magnifying glass icon within the high right-hand nook of your Mac toolbar.
- When the pop-up search window seems, kind Terminal. You don’t must hit the Return key; the outcomes ought to robotically seem inside a couple of seconds.
- Choose the Terminal app when it reveals up — you must see it as the highest consequence.
- When the Terminal app opens, kind open /Library/PostgreSQL/model quantity/uninstallpostgresql.app. If that doesn’t work, attempt sudo /Library/PostgreSQL/model quantity/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh.
- Hit the Return key, enter your password, and comply with the uninstallation directions in your display.
2. Delete Your Consumer Account
After eradicating PostgreSQL, you also needs to delete your consumer account to unencumber house in your gadget. Notice which you could solely do that for accounts that you just aren’t signed into; if it is advisable delete the primary account in your Mac, you must make a brand new one first.
Right here’s the way to delete your consumer account:
- Faucet the Apple icon within the high left-hand nook. Then, choose System Settings when the drop-down menu seems.
- Go to Customers & Teams within the toolbar on the left.
- Discover your account and choose the data icon (i).
- When the subsequent pop-up window seems, click on on Delete Consumer.
- One other pop-up window will then present up in your Mac. When it does, select whether or not you wish to save any consumer settings after which press Delete Consumer once more.
NOTE
Typically, you’ll should delete different PostgreSQL information and folders in your gadget. You are able to do this by going to Terminal and typing sudo rm -rf /Library/PostgreSQ
— after doing that, hit Return and kind in your password.
What to Do if PostgreSQL Gained’t Uninstall
In case you’ve accomplished all the pieces listed above however you haven’t been capable of fully eliminate PostgreSQL, you’ll be able to attempt a couple of extra issues to resolve the difficulty. From restarting your pc to restoring it to a earlier model, listed here are 4 issues to aim.
1. Restart Your Mac and Strive Once more
The simplest place to start out is by rebooting your Mac after which attempting to uninstall PostgreSQL once more, together with deleting your account. It doesn’t matter if you happen to shut down your gadget and manually flip it again on or robotically restart all the pieces, however the latter requires much less handbook work and I’ll subsequently present you ways to try this.
- Go to the Apple menu icon and broaden the dropdown menu.
- Choose Restart.
- Verify that you just wish to restart your Mac within the pop-up window. In case you do nothing for 60 seconds, your gadget will robotically flip on and off.
- Wait to your Mac to totally restart. When the login web page seems, enter your password such as you usually would when switching in your gadget.
- Go to Terminal and attempt to uninstall PostgreSQL by following the identical steps outlined within the first part.
2. Use Terminal
Along with the instructions I’ve already mentioned that you must use, there’s one other choice to take away your information in Terminal. Right here’s the way to use it:
- Go to Highlight and seek for Terminal.
- When Terminal opens, kind
sudo rm /and so forth/postgres-reg.ini
and hit the Return key. - Enter your password. This could take away extra information from the app.
- Kind the opposite two instructions once more that I discussed earlier, and hit your Return key for each. Enter your password to take away these.
- Flip your Mac on and off once more.
3. Test Your Admin Permissions
More often than not, solely folks with administrative permissions can delete apps and packages on a Mac. So, if you happen to can’t delete PostgreSQL, it may very well be as a consequence of your account’s permissions. You possibly can examine and alter these by going to System Settings:
- Open System Settings and choose Customers & Teams.
- Choose the data icon subsequent to your consumer account. Info Icon in System Settings”>
- Toggle Permit consumer to manage this pc on.
- A pop-up window will seem and inform you that you need to restart your pc. When it seems, choose OK.
- Restart your Mac to convey the brand new circumstances into impact.
4. Restore Your Mac to a Earlier Model
Restoring your Mac to a earlier model is essentially the most inconvenient approach to take away PostgreSQL, and also you’ll use loads of saved information if it didn’t exist at that earlier level. Nevertheless, if all else has failed to this point, it’s a chance. If it is advisable go to these lengths, you’ll be able to comply with these directions:
- Open Highlight and seek for Migration Assistant earlier than opening the app.
- Choose Proceed. It will shut all open apps in your gadget, so just be sure you’ve saved all the pieces.
- In Migration Assistant, you’ll see three choices. Tick the circle subsequent to From a Mac, Time Machine, or Startup disk, and choose Proceed.
- Select the Time Machine backup for which you wish to restore your pc. Then, press Proceed once more.
- Tick all the data you wish to restore in your gadget. Choose Proceed as soon as extra.
- Wait to your Mac to revive.
Deleting PostgreSQL usually isn’t an advanced course of, and it shouldn’t take you greater than 10 minutes. You’ll first must delete the app and any information related to it, earlier than then eradicating your account. In case you’re unable to do these, there are a handful of issues you’ll be able to attempt to repair the difficulty. Hopefully, having learn this text, now you can take away PostgreSQL with out additional points.