{"id":6555,"date":"2019-09-16T07:07:15","date_gmt":"2019-09-16T07:07:15","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=6555"},"modified":"2019-09-16T07:07:15","modified_gmt":"2019-09-16T07:07:15","slug":"learn-to-remove-postgresql","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/","title":{"rendered":"Learn to Remove PostgreSQL"},"content":{"rendered":"<p>Sometimes while installing software, something goes wrong and you realize that the complete program isn\u2019t downloaded or the installation was interrupted for some reason which leaves you with incomplete files and empty directories. Honestly, this happens rarely but the possibilities of occurrence are from time to time. This gives rise to the question: how to completely uninstall recently installed software?<\/p>\n<p>This tutorial will guide you on safely removing PostgreSQL from Ubuntu 16.04 server.<\/p>\n<p>It is important to back up any databases that you may need, prior to deleting anything from your system.<\/p>\n<h3>Step 1: List the PostgreSQL Packages<\/h3>\n<p>Using the dpkg tool, list the packages pertaining to the PostgreSQL setup.<\/p>\n<pre class=\"lang:default decode:true\">dpkg -l | grep postgres<\/pre>\n<p><strong>Output:<br \/>\n<a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-6561\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-1024x158.png\" alt=\"\" width=\"1024\" height=\"158\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-1024x158.png 1024w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-300x46.png 300w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-768x118.png 768w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min.png 1148w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><br \/>\n<\/strong><\/p>\n<h3>Step 2: Delete the PostgreSQL Packages<\/h3>\n<p>In Step 1, you can see all of the software packages related to the PostgreSQL install. For removing and deleting them all with one command, use the below remove command:<br \/>\napt-get &#8211;purge remove command<\/p>\n<p>Below the command mention the name of each package indicated separated with a space. Here for a particular version of PostgreSQL, the software installed was:<\/p>\n<ul>\n<li>pgdg-keyring<\/li>\n<li>postgresql-10<\/li>\n<li>postgresql-client-10<\/li>\n<li>postgresql-client-common<\/li>\n<li>postgresql-common<\/li>\n<\/ul>\n<p>Hence, here the purge remove command will look as below:<\/p>\n<pre class=\"lang:default decode:true \">sudo apt-get --purge remove pgdg-keyring postgresql-10 postgresql-client-10 postgresql-client-common postgresql-common<\/pre>\n<h3>Step 3: Verifying the Deletion of PostgreSQL<\/h3>\n<p>After removing these packages, you won\u2019t be able to enter into the PostgreSQL environment. This can be verified by running the grep command again and searching for postgres:<\/p>\n<pre class=\"lang:default decode:true\">root@newclient:~# dpkg -l | grep postgres\r\nroot@newclient:~#<\/pre>\n<p>You shouldn\u2019t get any output from that command and this means, PostgreSQL has been uninstalled successfully!<\/p>\n<p>In this way, you can remove PostgreSQL.<\/p>\n<p><strong>Also Read:<\/strong><\/p>\n<p><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-create-a-postgre-user\/\" target=\"_blank\" rel=\"noopener\"><strong>Learn to Create a PostgreSQL User<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-create-a-postgre-database\/\" target=\"_blank\" rel=\"noopener\"><strong>Learn to Create a PostgreSQL Database<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes while installing software, something goes wrong and you realize that the complete program isn\u2019t downloaded or the installation was interrupted for some reason which leaves you with incomplete files and empty directories. Honestly, this happens rarely but the possibilities of occurrence are from time to time. This gives rise to the question: how to [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[230],"tags":[1000,858,999],"class_list":["post-6555","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-database","tag-delete-postgresql","tag-postgresql","tag-remove-postgresql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn to Remove PostgreSQL<\/title>\n<meta name=\"description\" content=\"The article describes the steps to remove PostgreSQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn to Remove PostgreSQL\" \/>\n<meta property=\"og:description\" content=\"The article describes the steps to remove PostgreSQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-16T07:07:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-1024x158.png\" \/>\n<meta name=\"author\" content=\"Pallavi Godse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pallavi Godse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/\",\"name\":\"Learn to Remove PostgreSQL\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-1024x158.png\",\"datePublished\":\"2019-09-16T07:07:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"description\":\"The article describes the steps to remove PostgreSQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min.png\",\"width\":1148,\"height\":177},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn to Remove PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\",\"name\":\"Pallavi Godse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g\",\"caption\":\"Pallavi Godse\"},\"description\":\"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pallavi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn to Remove PostgreSQL","description":"The article describes the steps to remove PostgreSQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/","og_locale":"en_GB","og_type":"article","og_title":"Learn to Remove PostgreSQL","og_description":"The article describes the steps to remove PostgreSQL.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2019-09-16T07:07:15+00:00","og_image":[{"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-1024x158.png","type":"","width":"","height":""}],"author":"Pallavi Godse","twitter_misc":{"Written by":"Pallavi Godse","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/","name":"Learn to Remove PostgreSQL","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min-1024x158.png","datePublished":"2019-09-16T07:07:15+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"description":"The article describes the steps to remove PostgreSQL.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2019\/09\/postgresql-min.png","width":1148,"height":177},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/learn-to-remove-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Learn to Remove PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945","name":"Pallavi Godse","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g","caption":"Pallavi Godse"},"description":"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pallavi\/"}]}},"views":759,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=6555"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6555\/revisions"}],"predecessor-version":[{"id":6562,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6555\/revisions\/6562"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=6555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=6555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=6555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}