Uninstalling Zimbra
--------
Uninstalling Zimbra Collaboration Suite
To uninstall servers, run the install script -u, delete the zcs directory, and remove the zcs.tgz file on the servers.
1.
cd to the original install directory for the zcs files.
2.
3.
Type ./install.sh -u
When Completely remove existing installation? is displayed, type Yes
The Zimbra servers are stopped, the existing packages, the webapp directories, and the /opt/zimbra directory are removed.
4.
5.
Type rm -rf [zcsfullfilename] to delete the ZCS directory.
Delete the zcs.tgz file.
----------------------XXXXXXXXX---------------------------------
To Stop the Zimbra Service, Login to zimbra server as root user or root privileaged rights user
then switch to zimbra user.
su – zimbra
zmcontrol stop
exit
You should be root after you run exit
Run the command:
ps -ef | grep -i zimbra
If you see running processes
Kill any lingering processes:
kill -9 <pid>
Below video i wrongly killed my own process. so please take care this part.and i skipped some steps.
Go to the zimbra package directory where install.sh file is located. the run the following command. if
you don’t have the package in server. copy the package from your desktop to server using file transfer tool like winscp.
# ./install.sh -u
Completely remove existing installation? Y
After sucessfull uninstallation. run these command to delete the user, group, folder and files.
userdel zimbra
userdel postfix
groupdel zimbra
groupdel postfix
rm -rf /opt/zimbra
rm -rf /var/log/*zimbra*
Remove the Zimbra Logging lines below from /etc/syslog.conf
# vi /etc/syslog.conf
local0.* -/var/log/zimbra.log
auth.* -/var/log/zimbra.log
mail.* -/var/log/zimbra.log
Remove Logrotate config file for zimbra
rm -f /etc/logrotate.d/zimbra
Remove Zimbra entries in /etc/rc*
chkconfig –del zimbra
----------------------------------XXXXXXXXXXXX------------------------------------------------------------------
As root:
1) Run the commands:
su – zimbra
zmcontrol stop
exit
(you should be root after you run exit)
2a) Run the command: ps -ef | grep -i zimbra
If you see running processes
2b) Kill any lingering processes: kill -9 <pid>
3a) Run the command: df
If you see "amavisd"
3b) run command: umount /opt/zimbra/amavisd<-new-blah>/tmp
4) cd /<tmp_tar_install_dir>/zcs/
5) Run the command: ./install.sh -u
6) Run the following commands to complete the unistall:
rm -rf /opt/zimbra
rm -rf /var/log/*zimbra*
rm -rf /tmp/*zimbra*
rm -rf /tmp/hsperfdata*
rm -rf /tmp/install.*
rm -rf /tmp/*swatch*
rm -rf /tmp/log*
Ensure that you removed ALL the files owned by the user zimbra AND that contain the name "zimbra" in:
/var/log/
/tmp/
7) Run the following commands to delete the users and groups:
userdel zimbra
userdel postfix
groupdel zimbra
groupdel postfix
8) Remove the line "/dev/shm /opt/zimbra/amavisd-new-2.4.1/tmp tmpfs defaults,users,size=150m,mode=777 0 0" from /etc/fstab.
9) Remove the Zimbra logging lines below from /etc/syslog.conf:
local0.* -/var/log/zimbra.log
auth.* -/var/log/zimbra.log
mail.* -/var/log/zimbra.log
10) Remove logrotate config file for Zimbra (CentOS, RHEL)
rm -f /etc/logrotate.d/zimbra
11) Remove the Zimbra lines below from /etc/prelink.conf (CentOS, RHEL)
# added for Zimbra
-l /opt/zimbra/lib
-l /opt/zimbra/sleepycat/lib
-l /opt/zimbra/openldap/lib
-l /opt/zimbra/cyrus-sasl/lib
-l /opt/zimbra/mysql/lib
12) Remove Zimbra entries in /etc/rc* (CentOS, RHEL)
chkconfig --del zimbra
Other methods:(assuming you didn't already try the above)
(dijichi2) if you get stuck and really want to just purge it from the system, try:
rpm -e `rpm -qa |grep zimbra`
rm -rf /opt/zimbra
delete zimbra entries from /etc/sudoers
delete zimbra entries from root and zimbra crontabs
---------