Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2017 July PostgreSQL: How to uninstall PostgreSQL 9.6 from Ubuntu

PostgreSQL: How to uninstall PostgreSQL 9.6 from Ubuntu

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

In this post, I am sharing necessary steps to remove or uninstall PostgreSQL 9.6 from Ubuntu OS. Yesterday, I was testing a few latest extensions in my PostgreSQL test server, and unfortunately, PostgreSQL Server corrupted.

As this is my test server, so simply I uninstalled full setup and again installed it.

PostgreSQL: How to Install PostgreSQL 9.6 on Ubuntu 16.04?

Please check below commands which I applied to uninstalled PostgreSQL:

First check Postgres related folders:

1
ubuntu@ip:~/anvesh$ dpkg -l | grep postgres

Result:

1
2
3
4
5
6
ii pgdg-keyring 2014.1 all keyring for apt.postgresql.org
ii postgresql-9.6 9.6.1-2.pgdg14.04+1 amd64 object-relational SQL database, version 9.6 server
ii postgresql-client-9.6 9.6.1-2.pgdg14.04+1 amd64 front-end programs for PostgreSQL 9.6
ii postgresql-client-common 178.pgdg14.04+1 all manager for multiple PostgreSQL client versions
ii postgresql-common 178.pgdg14.04+1 all PostgreSQL database-cluster manager
ii postgresql-contrib-9.6 9.6.1-2.pgdg14.04+1 amd64 additional facilities for PostgreSQL

Command to remove few postgres folders:

1
ubuntu@ip:~/anvesh$ sudo apt-get --purge remove postgresql postgresql-doc

Now check again Postgres related folders:

1
ubuntu@ip:~/anvesh$ dpkg -l | grep postgres

Result:

1
2
3
ii pgdg-keyring 2014.1 all keyring for apt.postgresql.org
ii postgresql-client-9.6 9.6.1-2.pgdg14.04+1 amd64 front-end programs for PostgreSQL 9.6
ii postgresql-client-common 178.pgdg14.04+1 all manager for multiple PostgreSQL client versions

Now remove all other pending folders:

1
ubuntu@ip:~/anvesh$ sudo apt-get --purge remove postgresql postgresql-client-9.6 postgresql-common pgdg-keyring

Now PostgreSQL is uninstalled so confirmt that PSQL is running or not:

1
2
3
ubuntu@ip:~/anvesh$ psql
The program 'psql' is currently not installed. You can install it by typing:
sudo apt install postgresql-client-common

Now check the Postgres service status:

1
2
3
4
ubuntu@ip:~/anvesh$ sudo service postgresql status
● postgresql.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Jul 14, 2017Anvesh Patel
SQL Puzzle: SQL Advance Query - If column forms a sequence then print 'Yes' otherwise 'No'SQL Server 2017: Start and Stop, Enable and Disable SQL Server Service on Linux
Comments: 3
  1. Renan
    September 11, 2018 at 12:00 pm

    Thanks! Help me a lot!

    ReplyCancel
  2. Anderson
    January 20, 2019 at 5:49 pm

    It Worked!! Thanks

    ReplyCancel
  3. Chris
    March 17, 2019 at 9:34 pm

    I guess it worked. But there are still icons there and when I want to install it again, it says that it’s already installed.

    ReplyCancel

Leave a Reply Cancel reply

CAPTCHA
Refresh

*

Anvesh Patel
Anvesh Patel

Database Engineer

July 14, 2017 3 Comments PostgreSQLAnvesh Patel, database, database research and development, dbrnd, plpgsql, Postgres Query, postgresql, PostgreSQL 9.6, PostgreSQL Administrator, PostgreSQL Error, PostgreSQL Monitoring, PostgreSQL Performance Tuning, PostgreSQL Programming, PostgreSQL Tips and Tricks, Uninstall
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....