Uninstall or Remove Maldet? (Bash Script)

Uninstall or Remove Maldet
Sometimes, you need to remove maldet from your server. This article will help you to know how to Uninstall or Remove Maldet via Bash Script.

How to uninstall or remove maldet?

This is not necessary, and it is better to keep the maldet. But in case if you want to remove/uninstall maldet, you have to remove every file created by maldet manually, and it is indeed a difficult task. So for those who want to remove maldet, I have created a simple bash script and just save it in a file and execute it after logging in to your server via SSH.

 

Steps 1: Create a file “auto_maldet_remover.sh” with the following contents

#!/bin/bash
#
##
# Copyright (C) ServerHealers.Com | Web Hosting Support Specialists
# This script is free to use and distribute. We hope this will be useful.
# If you face any issues or if you need any further help,
# Feel free to reach us at ServerHealers.Com
#######################
## Malware Detect Uninstall Script ###
#######################
RED='33[01;31m'
RESET='33[0m'
GREEN='33[01;32m'
inspath=/usr/local/maldetect
logf=$inspath/event_log
cnftemp=.ca.def
if [ ! -d "$inspath" ];then
echo " "
echo -e $RED"Maldet is not installed in this system! Exiting"$RESET
echo
echo "If you want to install, you can follow our tutorial"
echo "https://serverhealers.com/blog/how-to-uninstall-or-remove-maldet-bash-script/"
echo
sleep 2
exit 1
else
rm -rf $inspath
rm -rf $cnftemp
rm -rf /usr/lib/libinotifytools.so.0
rm -rf /etc/cron.daily/maldet
rm -rf /etc/cron.d/maldet_pub
rm -rf $inspath.bk*
rm -rf $inspath.last*
fi
echo
echo
echo -e "$GREEN***********************************************************************************************$RESET"
echo -e " Success!"
echo -e "$GREEN***********************************************************************************************$RESET"
echo
echo
echo "If you want to install again, you can follow our tutorial"
echo "https://serverhealers.com/blog/how-to-uninstall-or-remove-maldet-bash-script/"
echo

 

Steps 2: Save the file and give the necessary permissions

chmod 755 auto_maldet_remover.sh

 

Steps 3: Run the script ( This will completely remove maldet from your system )

./auto_maldet_remover.sh

 

 

So that’s how you uninstall or remove Maldet from your Linux system.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Linux Management Services

Focus on your business, and let us take care of your Linux Servers!
From what you are reading, it seems you are interested in Linux and related technologies. If you have a moment to spare, please take a look at our Linux Management Services plan, which might interest you even more!
Linux Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

Introducing - WPHealers!

Complete WordPress Management, 24x7 Support & White Label Agency Plans!

WordPress migration service, security, white-label reseller services and lot more! Grab the introductory deals now!

WPHealers

ServerHealers uses cookies.