unable to uninstall spamassassin

terry

Verified User
Joined
May 24, 2005
Messages
34
Hiya i have a problem uninstalling spamassassin

I use the command rpm -e spamassassin

I get error msg saying error: package spamassassin is not installed

Any idea?
 
To get the package name run the following command:

rpm -qa | grep -i spam*

After that you can do:

rpm -e packagename
 
Last edited:
That means i run the command in this way:

rpm -qa
grep -i spamassassin
rpm -e spamassassin

is this correct?
 
No, you simply run:
Code:
# rpm -qa | grep spamassassin
and then run the rpm -e command on all lines returned.

And then you must make manual changes (see below) to your exim.conf file and restart exim.

However: This will only work if SpamAssassin is installed from an rpm. I believe most of us install SpamAssassin using the DirectAdmin spam.sh script.

In that case this will uninstall it, though it may not delete all the files:

Howeve, you must consider this Important Note and you don't feel you're capable of doing this without possibly damaging your system (even possibly beyond repair) you may want to hire an experienced system administrator to do it for you:

Important Note: If you don't know how to read and follow code snippets in these forums then you must know at least the following:

First: everytime you use -f as a modifier to the rm command you risk losing all the files on your server; this could happen under two conditions: I've made a mistake in my code snippets, or you've made a mistake in copying them. In either event I'm NOT responsible unless you've hired me to do the work.

Second: you don't ever type in the # character or the space which follows; these are included simply to show you that the work has to be done by root.

Now on to how it's done:

First edit your exim.conf file: comment out the section spamcheck_director and the section spamcheck, including the first line (the one followed by the colon character) of each.

Then restart exim.

Then execute the following command on your server as root:
Code:
# whereis spamassassin
On my system it returns:
Code:
/usr/bin/spamassassin /usr/share/spamassassin /usr/share/man/man1/spamassassin.1
Then cd into the directory contining the spamassassing program:
Code:
cd /usr/bin
and delete the spamassassin programs:
Code:
# rm spamassassin
# rm spamc
# rm spamd
Then kill spamc and spamd running in memory:
Code:
# killall -9 spamc
# killall -9 spamd
Then switch to the directory where the shared spamassassin configurations directory is located:
Code:
# cd /usr/share
and delete the directory:
Code:
# rm -Rf spamassassin
Then remove the spamassassin manfile:
Code:
# rm /usr/share/man/man1/spamassassin.1
Then remove the spamassassin directory inside of /etc/mail:
Code:
# rm -Rf /etc/mail/spamassassin
Then remove any directories DirectAdmin used for installing SpamAssassin:
Code:
# rm -Rf Mail-SpamAssassin-*

That should do it.

Jeff
 
Back
Top