Ubuntu: Uninstall Observium

To uninstall from an Ubuntu system, you must manually remove its installation directory, database, and associated services, as it is typically installed via a manual script rather than a standard package manager.

Below is a structured guide to completely removing Observium while keeping your base OS clean. How to Completely Uninstall Observium from Ubuntu If you installed Observium following the official guide , use the following steps to decommission it. 1. Stop and Disable Cron Jobs

Observium relies on several cron tasks for polling and discovery. You must remove these to stop the background processes. Open the Observium cron file (typically located in /etc/cron.d/ sudo rm /etc/cron.d/observium If you added cron jobs via crontab -e , remove any lines pointing to /opt/observium/ 2. Delete the Installation Directory Most installations reside in /opt/observium

. Removing this folder deletes the application code, logs, and RRD (graph) data. sudo rm -rf /opt/observium 3. Drop the MariaDB/MySQL Database

Observium stores its configuration and device data in a dedicated database. Log into your database: sudo mysql -u root -p Remove the database and the specific user: observium; 'observium' 'localhost' PRIVILEGES Use code with caution. Copied to clipboard 4. Remove Web Server Configuration

You should remove the virtual host file created for Apache or Nginx. For Apache: sudo a2dissite observium.conf sudo rm /etc/apache2/sites-available/observium.conf sudo systemctl restart apache2 For Nginx: sudo rm /etc/nginx/sites-enabled/observium.conf sudo rm /etc/nginx/sites-available/observium.conf sudo systemctl restart nginx 5. Optional: Remove the Dedicated System User If you created a specific user during setup, you can safely remove it. sudo deluser observium sudo delgroup observium 6. Cleanup Dependencies (Caution) Observium requires packages like . Only remove these if they are being used by other applications. sudo apt purge rrdtool fping snmpd snmp sudo apt autoremove If you are running Observium in a Docker container

, you can simply stop the container and delete the associated volumes/directories. to replace Observium? Install Observium on Debian/Ubuntu

To uninstall from Ubuntu, you must manually delete its installation directory, cron jobs, and database, as it is typically installed via a source archive rather than a standard package manager. Step 1: Stop Services and Remove Cron Jobs

Observium relies on scheduled tasks (cron) to poll devices. These must be removed first to prevent background scripts from running during deletion. Remove Cron File

: Delete the dedicated cron configuration, usually located at /etc/cron.d/observium Stop Web Server

: If you no longer need Apache or Nginx, you can stop the service (e.g., sudo systemctl stop apache2 Step 2: Delete Installation Directory The default installation path for Observium is typically /opt/observium

. Use the following command to remove the entire directory and its contents (logs, RRD data, and configuration files): sudo rm -rf /opt/observium Step 3: Drop the MySQL/MariaDB Database

You must manually remove the database and the dedicated user account created during setup. Log into your database: sudo mysql -u root -p Identify the database name (default is usually Execute the following SQL commands: DROP DATABASE observium; DROP USER 'observium'@'localhost'; FLUSH PRIVILEGES; Step 4: Cleanup Web Server Configuration

If you created a specific virtual host for Observium, you should remove it: : Disable the site and delete the config file: sudo a2dissite observium.conf sudo rm /etc/apache2/sites-available/observium.conf sudo systemctl restart apache2 Step 5: (Optional) Remove Dependencies

If Observium was the only application using certain prerequisites (like PHP modules or SNMP utilities), you can remove them using . However, exercise caution as other system services may rely on these: sudo apt autoremove --purge

(This will remove unused dependencies and their configuration files). Ask Ubuntu web server packages are safe to remove from your specific Ubuntu version? Install Observium on Debian/Ubuntu uninstall observium ubuntu

To uninstall Observium from Ubuntu, you must manually remove its files, database, and system configurations because it typically installs into a specific directory rather than as a standard system package. 1. Delete Installation Files

Remove the main Observium directory and the cron jobs that handle polling: sudo rm -rf /opt/observium sudo rm /etc/cron.d/observium 2. Drop the Database

Delete the MySQL/MariaDB database and the associated user created during installation: Log in to MySQL: mysql -u root -p Run these commands: DROP DATABASE observium; DROP USER 'observium'@'localhost'; FLUSH PRIVILEGES; EXIT; 3. Remove Apache Configuration Disable the site and remove the virtual host file: sudo a2dissite observium.conf sudo rm /etc/apache2/sites-available/observium.conf sudo systemctl restart apache2 4. Cleanup Logs and RRD Files If you want to completely wipe all historical data: sudo rm -rf /var/log/observium

Ensure all RRD files inside /opt/observium/rrd are gone (this is covered by step 1).

💡 Tip: If you only want to stop the service without deleting data, just disable the Apache site and remove the cron file. If you'd like to:

Keep your historical data before deleting everything (back up RRD files)? Reinstall a fresh version? Switch to a different monitoring tool like LibreNMS? Install Observium on Debian/Ubuntu

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: To uninstall from an Ubuntu system, you must

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 installation directory, cron jobs, and database, as it is typically installed from source rather than a standard package manager. 1. Remove Cron Jobs and Scripts

Observium relies on cron for polling and discovery. You need to delete the specific cron file created during installation. Run: sudo rm /etc/cron.d/observium 2. Delete the Installation Directory

The default installation directory is usually /opt/observium. Deleting this folder removes the application files and the web interface. Run: sudo rm -rf /opt/observium 3. Drop the Database

Observium stores its data in a MariaDB or MySQL database. You should remove the dedicated database and user. Log into your database: sudo mysql -u root -p Drop the database: DROP DATABASE observium; Remove the user: DROP USER 'observium'@'localhost'; Exit: EXIT; 4. Clean Up Web Server Configuration

If you configured a virtual host for Observium in Apache or Nginx, you should remove those configuration files to fully clean the system.

For Apache: sudo rm /etc/apache2/sites-available/observium.conf and then sudo systemctl reload apache2. Remove the site symlink and configuration file: sudo

For Nginx: sudo rm /etc/nginx/sites-available/observium.conf and then sudo systemctl reload nginx. 5. Optional: Remove Dependencies

Observium requires several packages like PHP, MariaDB, and SNMP. If you no longer need these for other applications, you can remove them using the standard Ubuntu uninstall method: Run: sudo apt purge php* mariadb-server snmp snmpd Run: sudo apt autoremove to clean up unused dependencies.

Do you also need help backing up your Observium data before proceeding with the uninstallation? Software Requirements - Observium

Uninstalling Observium from an Ubuntu system requires a manual process because it is typically installed by extracting a tarball and setting up services rather than using a standard package manager like apt. Review of Uninstallation Steps

To completely remove Observium and its associated components, follow these steps: Install Observium on Debian/Ubuntu

For Nginx:

  1. Remove the site symlink and configuration file:

    sudo rm /etc/nginx/sites-enabled/observium
    sudo rm /etc/nginx/sites-available/observium
    
  2. Test and reload Nginx:

    sudo nginx -t
    sudo systemctl reload nginx
    

Step 3: Remove the Database

Observium uses a MySQL or MariaDB database. You should drop the database to free up space and remove old credentials.

  1. Log in to the database server:

    sudo mysql -u root -p
    
  2. Run the following SQL commands (replace observium if you named your database differently):

    DROP DATABASE observium;
    DROP USER 'observium'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;
    

Step 3: Remove Observium Files

The default installation location is /opt/observium. Delete it entirely:

sudo rm -rf /opt/observium

Also remove any symlinks or other copies (e.g., if installed in /var/www/html/observium):

sudo rm -rf /var/www/html/observium   # only if applicable

Step 4: Remove Web Server Configuration

You need to remove the VirtualHost configuration so the web server stops trying to load the deleted directory.

For Apache:

# Remove the config file
sudo rm /etc/apache2/sites-available/observium.conf
# If you created a symbolic link in sites-enabled, remove it:
sudo rm /etc/apache2/sites-enabled/observium.conf
# Restart Apache to apply changes
sudo systemctl restart apache2

For Nginx:

sudo rm /etc/nginx/sites-available/observium.conf
sudo rm /etc/nginx/sites-enabled/observium.conf
sudo systemctl restart nginx