Professional Documents
Culture Documents
How To Completely Uninstall PostgreSQL - ObjectRocket
How To Completely Uninstall PostgreSQL - ObjectRocket
How To Completely Uninstall PostgreSQL - ObjectRocket
Contents
Resources PostgreSQL How To Completely Uninstall
PostgreSQL
Introduction
Uninstall and remove PostgreSQL on
Debian Linux
How To Completely Uninstall
Grep for all PostgreSQL packages
in Debian Linux PostgreSQL
Remove all of the PostgreSQL data
and directories Written by Data Pilot Subscribe
POSTGRESQL
September 10, 2019 Like
Uninstall and remove PostgreSQL
packages on Fedora Linux
Finally, make sure to use the APT-GET repository’s --purge remove command,
followed by the postgres package name. This command will remove the package
and purge all the data associated with it:
After you complete your rm commands, execute the dpkg -l | grep postgres
command one more time to verify that all of the packages have been removed.
To use a wildcard operator ( * ) to remove all packages with names beginning with
postgres , use the following command:
1 rm /var/lib/pgsql
NOTE: Keep in mind that sudo is not enabled for RHEL users by default. Instead, use
the su (switch user) command to enter as root and execute the above commands
with elevated privileges if necessary.
If you prefer, you can shorten the search to something like post as well:
You can also use grep in conjunction with YUM’s list command to return a list of
all package instances of PostgreSQL:
Navigate to the assigned directory for the PostgreSQL data, and then use the rm
command to delete all of your databases and tables.
https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757 3/8
24/03/2021 How To Completely Uninstall PostgreSQL | ObjectRocket
Then, follow the steps for the removal process, making sure to select the “Entire
Components option when prompted.
You’ll see a pop-up stating something like: The data directory s(C:\Program
Files\PostgreSQL\11\data) has not been removed . Simply click “OK” to close the
pop-up window, and do not select the option to restart your PC.
After all of the data has been deleted, you should restart Windows 10.
Use the cd command to navigate to the PostgreSQL directory. You can do this by
typing the directory path into the terminal prompt and pressing Return:
1 cd /Library/PostgreSQL/11
Then, use the rm -rf command to remove the directory and its contents:
1 sudo rm -rf
Don’t forget to empty the Trash application’s contents when you are nished.
https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757 5/8
24/03/2021 How To Completely Uninstall PostgreSQL | ObjectRocket
1 brew list
Then, use the following command to force the removal the Homebrew installation of
postgresql :
Conclusion
If you nd yourself needing to uninstall PostgreSQL, it’s important to do a careful and
thorough job. Taking shortcuts when it comes to the removal process can leave
sensitive data remaining on your machine. In this article, we explained how to uninstall
and remove PostgreSQL from Windows, Linux and macOS. With the step-by-step
instructions detailed in this tutorial, you’ll be ready to remove PostgreSQL from any of
your own machines.
GET STARTED
Related Topics:
PostgreSQL SELECT First Record on an ObjectRocket Instance
PostgreSQL Insert for an ObjectRocket Instance
How to Use the Postgres COUNT on an ObjectRocket Instance
https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757 6/8
24/03/2021 How To Completely Uninstall PostgreSQL | ObjectRocket
Additional Information:
How to use PostgreSQL UPDATE WHERE on an ObjectRocket Instance
How to Perform the PostgreSQL Coalesce in ObjectRocket Instance
How to Use the Postgres Similar To Operator on an ObjectRocket instance
How to Use the PostgreSQL in Docker in ObjectRocket Instance
Email Address*
SUBMIT
SERVICES
Services
MongoDB
Elasticsearch
Redis
Database Migration
PLATFORM
Pricing
Cost of Ownership
COMPANY
About ObjectRocket
Careers
Contact Us
RESOURCES
Resources
Blog
Case Studies
Documentation
EBooks
White Papers
SUPPORT
Support
Submit Ticket
System Status
Documentation
https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757 7/8
24/03/2021 How To Completely Uninstall PostgreSQL | ObjectRocket
MongoDB® is a registered trademark of MongoDB, Inc. Redis® and the Redis® logo are trademarks of Salvatore San lippo in
the US and other countries. Elasticsearch® is a trademark of Elasticsearch BV, registered in the US and in other countries.
https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757 8/8