Uninstall Observium Ubuntu

sudo rm -rf /opt/observium/rrd

If RRDs are stored elsewhere (check config.php), remove that location:

sudo rm -rf /var/lib/observium/rrd

That covers a thorough, end-to-end uninstall of Observium on Ubuntu. If you want, tell me your Observium path, PHP version, and whether you used MySQL/MariaDB and Apache or Nginx, and I’ll generate exact commands tailored to your system.

Moving On: How to Completely Uninstall Observium from Ubuntu

Observium is a fantastic low-maintenance auto-discovering network monitoring platform, but sometimes your infrastructure needs change. Whether you are migrating to another tool like Zabbix or LibreNMS or simply cleaning up an old server, uninstalling it isn't as simple as a single command. Because Observium is often installed manually via a web stack (Apache/PHP/MySQL), you have to dismantle several layers to ensure a clean removal.

Here is your step-by-step guide to purging Observium and its data from your Ubuntu system. 1. Back Up Your Data (Optional)

Before you start deleting, decide if you need your historical monitoring data. If so, back up the RRD files and the database.

Database: mysqldump -u root -p observium > observium_backup.sql RRD Files: These are located in /opt/observium/rrd. 2. Stop the Cron Jobs

Observium relies heavily on cron jobs for discovery and polling. If you don't stop these first, the system will continue trying to run scripts that you are about to delete, filling your logs with errors. Open the cron file: sudo nano /etc/cron.d/observium

Alternatively, if they were added to the system crontab: sudo crontab -e

Delete or comment out all lines related to discovery.php and poller.php. 3. Remove the Web Configuration

Since Observium usually runs through Apache or Nginx, you need to remove the virtual host configuration. For Apache: uninstall observium ubuntu

Identify the config file (usually /etc/apache2/sites-available/observium.conf). Disable the site: sudo a2dissite observium.conf

Remove the file: sudo rm /etc/apache2/sites-available/observium.conf Restart Apache: sudo systemctl restart apache2 4. Drop the Database

Observium stores its configuration and device metadata in a MySQL/MariaDB database. You should remove the database and the associated user to free up resources. Log into MySQL: sudo mysql -u root -p Run the following commands:

DROP DATABASE observium; DROP USER 'observium'@'localhost'; FLUSH PRIVILEGES; EXIT; Use code with caution. Copied to clipboard 5. Delete the Application Files

The default installation directory for Observium is /opt/observium. Deleting this folder will remove the PHP files, the RRD data (graphs), and any logs stored there. Run: sudo rm -rf /opt/observium 6. Clean Up Dependencies (Cautiously)

If you installed a specific PHP version or extra packages solely for Observium, you can remove them using the APT package manager.

Use sudo apt-get purge for specific tools like fping, snmp, or rrdtool if no other applications are using them.

Run sudo apt autoremove to clear out any orphaned dependencies that are no longer needed by the system. Conclusion

Your Ubuntu system is now clean of Observium. If you are looking for a replacement, many users transition to LibreNMS—which is a fork of Observium—as it offers a similar feel with a more community-driven, open-source model.

To uninstall Observium from Ubuntu, you must manually remove its files, database, and scheduled tasks. Observium does not typically have a standard "uninstaller" script because it is often installed manually via a tarball. 1. Stop Web and SNMP Services sudo rm -rf /opt/observium/rrd

Before deleting files, ensure the web interface and background processes are stopped to avoid locked files. Stop Apache/Nginx: sudo systemctl stop apache2 (or nginx). Stop SNMP Daemon: sudo systemctl stop snmpd. 2. Remove Scheduled Cron Jobs

Observium uses cron jobs for discovery and polling. If these aren't removed, they will continue to try (and fail) to run scripts that no longer exist.

Check for the main cron file: sudo rm /etc/cron.d/observium.

Verify your user crontab for any manual entries: crontab -e. Look for lines referencing /opt/observium and delete them. 3. Delete the Database

Removing the software directory does not delete your historical data stored in the database. Log in to MariaDB/MySQL: mysql -u root -p. Drop the database: DROP DATABASE observium;.

Remove the dedicated user (usually named 'observium'): DROP USER 'observium'@'localhost';. Exit: exit. 4. Delete the Installation Directory

By default, Observium is installed in /opt/observium. This directory contains the configuration files, logs, and RRD (graph) data. Ubuntu/Debian Install - Observium

ls -la /etc/apache2/sites-available/ | grep observium

All commands should return no results (empty output or "not found").


Observium relies on the poller, discovery, and alerts cron jobs or services. Stop them first. If RRDs are stored elsewhere (check config

sudo systemctl stop apache2   # or nginx, if used for Observium
sudo pkill -f observium       # kill any running poller/discovery processes

If you have systemd service files for Observium (e.g., observium-poller.service), disable and stop them:

sudo systemctl stop observium-poller observium-discovery
sudo systemctl disable observium-poller observium-discovery

Remove cron jobs (critical):

sudo crontab -u www-data -l | grep -v observium | sudo crontab -u www-data -
sudo crontab -l | grep -v observium | sudo crontab -

If you want a permanent removal, disable and remove the timer units so they don’t resurrect after a reboot.

sudo systemctl disable observium_discovery.timer observium_poller.timer
sudo systemctl disable observium_discovery.service observium_poller.service

Observium typically adds a virtual host file. Remove it:

Apache:

sudo rm -f /etc/apache2/sites-available/observium.conf
sudo rm -f /etc/apache2/sites-enabled/observium.conf
sudo systemctl reload apache2

Nginx:

sudo rm -f /etc/nginx/sites-available/observium
sudo rm -f /etc/nginx/sites-enabled/observium
sudo systemctl reload nginx

Observium is a powerful network monitoring platform, but there may come a time when you need to remove it. Perhaps you are migrating to a different monitoring tool like LibreNMS or Zabbix, freeing up resources on a development server, or simply starting fresh with a clean installation.

Whatever the reason, uninstalling Observium isn't as simple as running a single apt-get remove command. Because Observium relies on a LAMP stack (Linux, Apache, MySQL/MariaDB, and PHP) and has specific cron jobs and configuration files, a complete uninstallation requires a few manual steps.

In this guide, we will walk through the process of completely removing Observium from an Ubuntu server.

Observium sometimes has custom PHP overrides:

sudo rm -f /etc/php/*/cli/conf.d/observium.ini
sudo rm -f /etc/php/*/fpm/conf.d/observium.ini