An Azure managed PostgreSQL database service for app development and deployment.
Here’s a clear and concise step-by-step guide to fully remove PostgreSQL from your system:
- Stop and uninstall PostgreSQL services
- Open Command Prompt as Administrator
- List active PostgreSQL services:
sc query | findstr /i postgresql - Stop each PostgreSQL service
net stop <service-name> - Delete each PostgreSQL service
sc delete <service-name>
- Delete Remaining Files: Manually check and remove any leftover PostgreSQL folders from the following locations:
- C:\Program Files\PostgreSQL
- C:\Program Files (x86)\PostgreSQL
- C:\Users<YourUsername>\AppData\Local\PostgreSQL
- Clean Up Windows Registry (PostgreSQL Removal)
- Open the Registry Editor (
regeditvia Run dialog). - Carefully delete PostgreSQL-related entries from:
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
- HKEY_LOCAL_MACHINE\SOFTWARE
- HKEY_CURRENT_USER\SOFTWARE ⚠️ Caution: Editing the registry can impact system stability. Proceed only if you're confident.
- Open the Registry Editor (
- Check Environment Variables
- Go to System Properties → Advanced → Environment Variables and ensure no PostgreSQL-related variables remaining.
- Restart Your Computer
- After removing all PostgreSQL components, restart your system to apply the changes fully.
Additionally, kindly refer the below document -
https://www.enterprisedb.com/docs/supported-open-source/postgresql/uninstalling/