Remove or Deinstall Plesk

This is happening in one of servers, my colleagues used it as an experiment, install webmin and plesk at once. Plesk wasn’t perfectly install, so i have to clean this up.

Use deinstall plesk command
# /usr/local/psa/admin/bin/deinstall.sh deinstall

Since plesk isn’t a clean and perfect installation (too many components missing), then above command doesn’t work at all. Perhaps this is a special case, in normal situation above command probably work

So use ‘manual’ removal.
Look in to system startup to check whether there are any services belongs to plesk
# chkconfig --list

If there are no services status ‘on’ in system startup, let’s remove plesk (if there is services status ‘on’, stop services)

Since I don’t know what components (the titles of RPM packages) from plesk in the system, find that first
# yum search psa

Now removal process :
# rpm -e psa psa-qmail psa-proftpd psa-autoinstaller psa-hotfix2 psa-pylibplesk psa-proftpd-xinetd psa-selinux psa-courier-imap-add psa-libpam psa-api psa-imp psa-mailman-configurator psa-tomcat-configurator psa-spamassassin psa-locale-base-en-US psa-logrotate psa-php4-configurator psa-horde

There are dependencies error, removal process stop

# rpm -e --nodeps psa

The –nodeps option tells the rpm command to skip the test of dependencies. Only psa removed in command, since dependencies error said psa needed by all components, and psa removed first. Then there is error: %trigger scriptlet failed warning, use :

rpm -q psa --triggers

this –triggers check what happen

then remove using :
rpm -e psa --notriggers

–notriggers ask rpm to remove psa without running the triggers

Plesk is really messed, above command doesn’t work also (i don’t know what my colleague did when he handled that server) so:

rpm --force -e psa
PSA removed, then remove other components (packages)

rpm -e psa-qmail psa-proftpd psa-autoinstaller psa-hotfix2 psa-pylibplesk psa-proftpd-xinetd psa-selinux psa-courier-imap-add psa-libpam psa-api psa-imp psa-mailman-configurator psa-tomcat-configurator psa-spamassassin psa-locale-base-en-US psa-logrotate psa-php4-configurator psa-horde

Shows up %preun and %postun scriptlets error, then

rpm -e --noscripts psa-qmail psa-proftpd psa-autoinstaller psa-hotfix2 psa-pylibplesk psa-proftpd-xinetd psa-selinux psa-courier-imap-add psa-libpam psa-api psa-imp psa-mailman-configurator psa-tomcat-configurator psa-spamassassin psa-locale-base-en-US psa-logrotate psa-php4-configurator psa-horde

Plesk components or packages removed

In normal situation, according to SWSOFT, to deinstall plesk just do following :
1. Need to know the titles of RPM packages
2. To deinstall run the command rpm -e

Now after plesk components removed,
1. Check and delete all databases and database tables used by Plesk
drop database psa;
drop database horde;

2. Open /etc/psa/psa.conf and look up the value assigned to the ‘HTTPD_VHOSTS_D’ variable, and delete : # rm-rf /directory-name/*
3. Delete all data related to mailboxes
# rm -rf /var/qmail/mailnames/*
4. Delete other directories used by plesk
# rm -rf /usr/local/psa
# rm -rf /etc/psa
# rm -rf /var/mailman
# rm -rf /var/drweb
# rm -rf /var/lib/wabalizer
# rm -rf /var/tomcat4 or # rm -rf /var/tomcat5

Leave a Reply