Uninstalling PGAdmin4 on macOS requires more than dragging the application to the Trash because residual configuration files, databases, and logs remain in hidden library folders. To perform a complete manual uninstall, you must locate and delete these persistent artifacts using Terminal commands or Finder navigation. This process ensures that no orphaned data interferes with future installations or causes permission conflicts.
Understanding Why Standard Uninstallation Fails
When you install PGAdmin4 via the official installer or Homebrew, the application places binaries in standard locations like
/Applications. However, user-specific data is stored in directories that are not automatically removed by the system's trash function. These include configuration settings, saved server connections, and local database files. If you simply move the app icon to the Trash, these files persist on your disk. This can lead to issues such as corrupted configurations when you attempt to reinstall the software later. Understanding this separation between the executable and user data is crucial for a clean removal.
Locating Persistent Files in the Library Folder
The primary location for user-specific data on macOS is the Library folder within your user home directory. This folder is hidden by default in modern versions of macOS. To access it, open Finder and select the
Go menu from the top bar. Hold down the
Option key; you will see a
Library option appear in the dropdown list. Click on it to navigate into the hidden directory. Inside, you need to look for two specific subdirectories:
Application Support and
Preferences. These folders contain the bulk of the persistent files associated with PGAdmin4.
Deleting Application Support Data
Navigate to
~/Library/Application Support. Look for a folder named
pgadmin4 or similar. This directory contains your local server definitions, query history, and cached data. Deleting this folder removes all personalized settings you have configured within the application. Before deleting, ensure you do not have any unsaved work or critical connection details that you might want to back up. Once you are certain, drag the
pgadmin4 folder to the Trash. You may be prompted to enter your administrator password to authorize the deletion of system-related files.
Removing Preference and Cache Files
Next, visit
~/Library/Preferences. Search for files starting with
org.pgadmin or
pgadmin4. These .plist files store window positions, theme preferences, and other UI states. Additionally, check the
Caches folder at
~/Library/Caches for any
pgadmin4 related entries. Clearing these caches ensures that no temporary data remains that could cause startup errors in the future. After removing these files, empty your Trash to permanently delete them from your storage drive.
Using Terminal for Complete Removal
For users comfortable with command-line interfaces, Terminal provides a faster and more precise method to remove these files. Open Terminal and execute the following commands to remove the application support and preference directories simultaneously. Replace
username with your actual macOS username if necessary, though tilde expansion usually handles this.
rm -rf ~/Library/Application\ Support/pgadmin4
rm -rf ~/Library/Preferences/org.pgadmin.*
rm -rf ~/Library/Caches/pgadmin4
This approach eliminates the risk of missing hidden files due to Finder view settings. It also allows you to verify the deletion by listing the contents of the Library folders afterward. If you installed PGAdmin4 via Homebrew, you should also run
brew uninstall pgadmin4 to remove the binary packages managed by the package manager.
Verifying the Clean Uninstall
After completing the steps above, restart your Mac to ensure that any background processes associated with PGAdmin4 are terminated. Check the Activity Monitor to confirm that no
pgadmin processes are running. You can also search your entire hard drive for "pgadmin" using Spotlight or Finder to ensure no stray files remain. If you plan to reinstall the application, you can now do so with a fresh configuration state. This method is particularly useful if you are troubleshooting installation failures or migrating to a different version of PostgreSQL tools. For more advanced system management tasks, such as managing keyboard shortcuts or retrieving SQL data directly, refer to our guide on
How to Use Default Keyboard Shortcut for Screenshot in MacOS and
Retrieving SQL Data using Terminal on Mac.
Frequently Asked Questions
Will deleting these files affect my PostgreSQL database?
No, deleting PGAdmin4 files does not affect your actual PostgreSQL server or its data. PGAdmin4 is merely a client interface; the database engine runs separately. Your tables, rows, and schemas remain safe on your server unless you explicitly drop them using SQL commands.
Can I recover deleted configuration files after uninstallation?
Once you empty the Trash, the files are permanently deleted from your local storage. Unless you have a Time Machine backup or another backup solution enabled before deletion, recovery is unlikely. Always export or note down important connection details before performing a manual uninstall.
Does Homebrew handle the cleanup of user data automatically?
Homebrew typically only removes the installed binaries and libraries located in its prefix. It does not automatically delete user-specific data in the Library folder. You still need to manually remove the
Application Support and
Preferences folders to achieve a complete uninstall.
What if I cannot find the Library folder in Finder?
If the Library folder does not appear even when holding the Option key, you can type the path directly into the Finder address bar. Enter
~/Library and press Enter. This bypasses the visibility setting and takes you directly to the hidden directory where the persistent files reside.
Is it safe to use the rm command in Terminal?
Yes, but you must be careful with syntax. The
-rf flags force removal without confirmation and handle recursive directories. Double-check the path before executing to avoid deleting unintended files. Using
ls to list the target directory before running
rm is a good safety practice.