How to Uninstall PostgreSQL v18.4 on Windows 11 (2026) | Step-by-Step Guide
Below is a Step-by-Step Guide to Uninstall PostgreSQL v18.4 on Windows 11:
Step 1: Follow Any of the Below Methods
Method 1 - Uninstall PostgreSQL via PostgreSQL Uninstaller
-
Go to PostgreSQL installed location:
C:\Program Files\PostgreSQL\18
-
Double-click on:
uninstall-postgresql.exe
- Click "Yes" if you get a security prompt.
- Select "Entire Application" and click "Next".
- Once uninstallation is complete, click "OK" → "OK".
Method 2 - Uninstall PostgreSQL via Windows Settings
- Press Windows + I to open Settings.
- Go to Apps.
- Click Installed apps.
-
Search for "PostgreSQL" and click:
... → Uninstall → Uninstall - Click "Yes" if you get a security prompt.
- Select "Entire Application" and click "Next".
- Once uninstallation is complete, click "OK" → "OK".
Method 3 - Uninstall PostgreSQL via Control Panel
- Press Windows + R.
-
Type the below command and press Enter:
appwiz.cpl
- Select "PostgreSQL" and click "Uninstall".
- Click "Yes" if you get a security prompt.
- Select "Entire Application" and click "Next".
- Once uninstallation is complete, click "OK" → "OK".
Step 2: Cleanup
Delete the below leftover files/folders if present:
%APPDATA%\pgadmin4 %APPDATA%\pgAdmin C:\Program Files\PostgreSQL\ C:\Program Files (x86)\PostgreSQL\
Step 3: Remove PostgreSQL from PATH
-
Press Win + R, type the below command and press Enter:
sysdm.cpl
- Go to the Advanced tab.
- Click Environment Variables.
- Under System variables, select Path and click "Edit".
-
Select the below path and click "Delete":
C:\Program Files\PostgreSQL\18\bin
- Click OK → OK → OK.
Step 4: Verify Uninstallation
-
Open Command Prompt and run the below command:
psql --version
-
You should get the below output confirming successful uninstallation:
'psql' is not recognized as an internal or external command.









Comments
Post a Comment