These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Uninstalling PostgreSQL? on the new forum.
I've installed Webmin and Virtualmin GPL into a VirtualBox Ubuntu 10.04.2 using the automatic installation script. After the installation, I noticed that PostgreSQL had been installed and is running. According to the instructions for manual install, PostgreSQL should be optional (I intend to only use MySQL), but apt says it is a dependency of webmin-base. Thus, it seems impossible to remove it. Is it possible to uninstall PostgreSQL? How would I do that? I've tried uninstallation via webmin and via console:
Failed to uninstall postgresql :
dpkg: dependency problems prevent removal of postgresql:
virtualmin-base depends on postgresql; however:
Package postgresql is to be removed.
dpkg: error processing postgresql (--remove):
dependency problems - not removing
Errors were encountered while processing:
postgresql
Failed to uninstall postgresql-8.4 :
dpkg: dependency problems prevent removal of postgresql-8.4:
postgresql depends on postgresql-8.4.
dpkg: error processing postgresql-8.4 (--remove):
dependency problems - not removing
Errors were encountered while processing:
postgresql-8.4
Failed to uninstall postgresql-client-8.4 :
dpkg: dependency problems prevent removal of postgresql-client-8.4:
postgresql-8.4 depends on postgresql-client-8.4.
virtualmin-base depends on postgresql-client; however:
Package postgresql-client is not installed.
Package postgresql-client-8.4 which provides postgresql-client is to be removed.
dpkg: error processing postgresql-client-8.4 (--remove):
dependency problems - not removing
Errors were encountered while processing:
postgresql-client-8.4
Failed to uninstall postgresql-client-common :
dpkg: dependency problems prevent removal of postgresql-client-common:
postgresql-common depends on postgresql-client-common (>= 106ubuntu1).
postgresql-client-8.4 depends on postgresql-client-common (>= 104~).
dpkg: error processing postgresql-client-common (--remove):
dependency problems - not removing
Errors were encountered while processing:
postgresql-client-common
Failed to uninstall postgresql-common :
dpkg: dependency problems prevent removal of postgresql-common:
postgresql-8.4 depends on postgresql-common (>= 104~).
dpkg: error processing postgresql-common (--remove):
dependency problems - not removing
Errors were encountered while processing:
postgresql-common
root@super:/# apt-get -s remove postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
apache2-suexec-custom pwgen bind9 sasl2-bin db4.8-util irb1.8 libapache2-svn
libnet-daemon-perl re2c clamav webmin-virtual-server bind9utils
webmin-virtualmin-awstats php5 libmail-spf-perl clamav-freshclam awstats
dovecot-imapd manpages-dev libhtml-template-perl libdbi-perl
mysql-client-core-5.1 libdbd-mysql-perl libdbd-pg-perl libc-dev-bin
libsocket6-perl mysql-server-5.1 libfile-copy-recursive-perl libgomp1 rdoc
mysql-client-5.1 libnet-xwhois-perl ri liberror-perl libnetaddr-ip-perl
clamav-base subversion postgresql-client-8.4 linux-libc-dev libclamav6
spamassassin gcc-4.4 libplrpc-perl libapache2-mod-fcgid apache2 procmail
libsvn1 clamav-testfiles spamc mysql-server-core-5.1 dovecot-pop3d php-pear
webmin-virtualmin-mailman webmin-virtualmin-htpasswd gcc mailman scponly
webmin-security-updates libpg-perl mysql-server irb clamav-daemon
update-inetd clamav-docs libnet-ip-perl openbsd-inetd
libio-socket-inet6-perl libnet-dns-perl rdoc1.8 procmail-wrapper webalizer
webmin-virtual-server-theme webmin-virtualmin-dav proftpd-basic
postgresql-client-common libc6-dev apache2-doc libdb4.7 libpq5 libtommath0
usermin-virtual-server-theme libdigest-hmac-perl binutils
libreadline-ruby1.8 libreadline5 postgresql-common dovecot-common
postgresql-8.4 webmin-virtualmin-svn libsys-hostname-long-perl
libneon27-gnutls ri1.8 libltdl7 libdigest-sha1-perl
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
postgresql virtualmin-base
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Remv virtualmin-base [1.0-29]
Remv postgresql [8.4.7-0ubuntu0.10.04]
root@super:/# aptitude why postgresql
id virtualmin-base Depends postgresql
Note: Since I am a Linux n00b, it may just be something I am doing wrong with the package managers. Please forgive me :)
Howdy,
Yeah, I wouldn't recommend removing Postgres -- it's setup as a dependency of Virtualmin (at least at the moment, in the future it'll be simpler to remove).
Instead of removing it, you can always just disable it, so that it's not running. At that point, all it's doing is taking up a few MB's of space :-)
To do that, you can first make sure Virtualmin isn't using it by going into System Settings -> Features and Plugins, and uncheck "PostgreSQL database".
Next, you can prevent Postgres from loading on startup by going into Webmin -> System -> Bootup and Shutdown, and set "At Boot" to "No" for the Posgres service.
-Eric
Well I'm glad I was on the right track; I had uninstalled the module and stopped the Postgres itself. Thanks for the hint about the startup, I hadn't thought about that :)
Hmmm... disabling startup is not trivial either. I guess I'll just have to be a bit less obsessive-compulsive about postgres :D
From the terminal (as root), execute:
update-rc.d -f postgresql-8.4 remove
I believe that service name is correct. If not, I'm sure you can figure it out :) (ls /etc/init.d | grep postgressql).
Thanks! The service name was correct (the ls/grep had a typo though: too many sses in postgres ;) ) Postgres is not started anymore when I reboot the server.
Changing startup settings via the "Bootup and Shutdown" module does not seem to work, but that is for another thread.
Ha - well spotted. I have much more against PostgreSQL than the spelling of its ridiculous name, trust me. :). Glad you've managed to eradicate it from your startup sequence.
To keep this thread complete: I noticed something about Postgres in the auth.log (
Successful su for postgres by root
)and found out that it is from the monitor.pl script that is run from Cron. I found https://www.virtualmin.com/node/11194 which helped me remove the Postgres server monitor.Eric,
Have you removed the dependency on postgresql so we can remove it?
When I try apt-get -s remove postgresql, I still get:
The following packages will be REMOVED:
postgresql virtualmin-base
2 to remove
Thx!
Howdy,
Current versions of virtualmin-base should not depend on postgres, along with most other dependencies.
However, if you performed the install awhile ago, and upgraded to a newer Virtualmin, it's possible that you have an older virtualmin-base installed that still relies on that dependency.
-Eric