DEV Community

Cover image for How to completely remove Centreon from your server
Achraf Lasri
Achraf Lasri

Posted on

How to completely remove Centreon from your server

Maybe you, as an IT engineer, have a faced a situation after you have done working with Centreon in a server or you want to transform your instance and the only way to do it is by reinstalling the platform, in this case you need to delete Centreon from your machine but you can't find a way to perfectly remove it. This post will show you how to completely uninstall Centreon from your Linux server.

What is Centreon in the first place

Centreon's Logo
Centreon is an Open Source software package that lets you supervise all the infrastructure and applications comprising your information system.
Centreon is powered by PHP, with some TypeScript, JavaScript, Perl, shell, and Symfony 5.4. The software is bundled with tons of features to monitor the complete IT Infrastructure from Cloud-to-Edge for a clear and comprehensive view.

We are just simply going to delete it … what is the big deal ?

What is the big deal ?

The simplest option to delete Centreon is by removing the centreon package using the package manager (yum, dnf, …).

However, it can affect some behavior problems if you install a new version. For instance, the web interface had a bug in the web installation and to fix it i had to remove the old files in /var/cache/centreon/symfony.

There are other files that used to have an old configuration and it can have an impact on the performance in the future or maybe the platform can stop working.

Lets fully remove Centreon then

Now that we are on the same page, it's time to clean your server.

You'll have to follow these steps to remove all centreon's files and folders that resides in your machine.

First, you need to stop and disable the service

systemctl stop centreon
systemctl disable centreon
Enter fullscreen mode Exit fullscreen mode

After that we can proceed to remove the packages

yum remove centreon*
Enter fullscreen mode Exit fullscreen mode

Now we have to get rid of the files in the /etc folder

rm -r /etc/centreon
rm -r /etc/centreon-broker
rm -r /etc/centreon-engine
rm -r /etc/centreon-gorgone
Enter fullscreen mode Exit fullscreen mode

You can use the -f "force" flag to delete the files instantly without any prompts or warnings. However, extreme caution should be taken when using the rm command as a slight typo or mistake can result in unrecoverable system damage.

Supposing that you have a Poller instance, you don't have the centreon-broker module so you will have to execute just the other three.

We carry on with the Centreon files, we need also to delete them from the /var/lib folder.

rm -r /var/lib/centreon
rm -r /var/lib/centreon-broker
rm -r /var/lib/centreon-engine
rm -r /var/lib/centreon-gorgone
Enter fullscreen mode Exit fullscreen mode

In the /usr folder we will find other Centreon folders, so let's just delete them.

rm -r /usr/share/centreon
rm -r /usr/lib/centreon
Enter fullscreen mode Exit fullscreen mode

We still got the logs in the /var/log folder, so we have to execute these commands.

rm -r /var/log/centreon
rm -r /var/log/centreon-broker
rm -r /var/log/centreon-engine
rm -r /var/log/centreon-gorgone
Enter fullscreen mode Exit fullscreen mode

And finally, we just need to delete the cache in the /var/cache directory.

rm -r /var/cache/centreon
Enter fullscreen mode Exit fullscreen mode

With that, you are free to install a new version of your Centreon's instance whether it can be a central server, remote server or just a poller.

That’s it for now.

Keep building.

Top comments (0)