Un-Install Zimbra Community CentOS 6

Un-Install Zimbra Community CentOS 6

This blog walks you through the un-installation of Zimbra on CentOS 6, if for whatever reason a step was missed, or done incorrectly, or you are un-installing.

The Zimbra installer has a built-in uninstall mode, install.sh -u. It stops Zimbra, removes every zimbra RPM package, and cleans up the crontab, init scripts and system limits that the install added. Common reasons to run it are a failed or half-finished install you want to redo cleanly, or retiring a server after a migration.

** NOT RESPONSIBLE FOR DATA LOSS!! *** HAVE A BACKUP BEFORE PROCEEDING

Before you start

  • Every mailbox, the LDAP directory and all configuration live under /opt/zimbra. Once it is deleted, they are gone.
  • If the server ever held real mail, take a full backup (or a VM snapshot) and make sure you have moved users first. See Migrate Zimbra Community to New Server.
  • Use the same installer package (the zcs-… directory) that you installed with. If you no longer have it, download the matching version again.
  • Work as root.

Step 1: go to the installer directory

cd /opt (or whatever directory zimbra is installed in)

cd /opt
ls
cd zcs-8.0.4_GA_5737.RHEL6_64.20130524120036
cd /opt and ls showing the zcs-8.0.4_GA_5737.RHEL6_64 installer folder with install.sh

Step 2: run the uninstaller

from here, as you know you used the install.sh to install.

Issue the following command to un-install

./install.sh -u
./install.sh -u run from the Zimbra installer directory

The script logs to /tmp/install.log.*, lists which zimbra packages it found, and saves the current configuration to /opt/zimbra/.saveconfig.

Step 3: confirm the removal

from here completely remove installation by hitting Y, ALL DATA WILL BE LOST!!!!

install.sh -u finds the installed zimbra packages, saves config to /opt/zimbra/.saveconfig, asks to remove

Done!

Zimbra packages removed, crontab and init scripts cleaned up, Finished removing Zimbra Collaboration Server

Step 4: delete the leftover files

from here delete all the older config files

rm -rf /opt/zimbra
rm -rf /opt/zimbra to delete the leftover Zimbra directory

The .saveconfig folder is inside /opt/zimbra, so copy it somewhere else first if you want to keep a record of the old settings.

Verify

rpm -qa | grep -i zimbra
ss -tlnp | grep -E ':(25|80|443|7071) '

The first command should return nothing. The second should show nothing listening on the mail, web and admin console (7071) ports. The zimbra system user may still exist; check with id zimbra and remove it with userdel zimbra if you are not reinstalling.

Troubleshooting

  • The uninstaller finds no installation: make sure you are running the installer for the same Zimbra version and that the packages are actually installed (rpm -qa | grep zimbra).
  • A reinstall fails on ports in use: another MTA such as Postfix or Sendmail may be running. Stop and disable it before installing Zimbra again.
  • Packages refuse to remove: remove the remaining ones by hand with rpm -e, then delete /opt/zimbra.

Newer releases

CentOS 6 is long past end of life. Current Zimbra releases run on RHEL-compatible 8 and 9 (and Ubuntu LTS), and their installers still use the same ./install.sh -u option to uninstall.

That’s it, you have Un-Installed Zimbra Community on CentOS 6

Hosted Linux Servers at www.zwiegnet.com/go

Related guides: Install Zimbra Community CentOS 6 | Upgrade Zimbra Community Version CentOS 6

Leave a Reply

Your email address will not be published. Required fields are marked *