Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 28721  / 3 Years ago, sun, september 26, 2021, 4:14:24

I simply don't understand what's going on.



sudo apt-get remove postgresql


results in:



Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'postgresql' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up postgresql-9.1 (9.1.10-0ubuntu13.04) ...
* Starting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output:
2013-11-05 12:40:58 PST FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": Permission denied
[fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
postgresql-9.1
E: Sub-process /usr/bin/dpkg returned an error code (1)


I mean, why is it trying to start the server. Right I'm a bit of a unix noob and a huge postgres noob so bear with me, but randomly starting the server while I'm trying to uninstall it seems so random. Just don't get it.



How can I completely and utterly uninstall postgresql?


More From » apt

 Answers
6

Your first installation was kept uncertain, this will nuke it:



sudo dpkg --purge postgresql-9.1


Now you can reinstall the package:



sudo apt-get -f install
sudo apt-get install postgresql-9.1

[#28547] Monday, September 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ainbby

Total Points: 184
Total Questions: 115
Total Answers: 112

Location: Colombia
Member since Thu, Sep 29, 2022
2 Years ago
ainbby questions
Thu, Mar 23, 23, 10:26, 1 Year ago
Wed, May 10, 23, 00:10, 1 Year ago
Fri, Apr 15, 22, 10:11, 2 Years ago
;