Uninstall Observium Ubuntu

To uninstall Observium from Ubuntu, you must manually remove its installation directory, database, and scheduled tasks, as it is typically installed from source rather than via a standard package manager.

The following steps provide a comprehensive guide to completely removing Observium and its associated components from your system. 1. Stop Observium Services

Before deleting files, stop any active processes to ensure a clean removal.

Stop the Web Server: Depending on your setup, stop either Apache or Nginx. For Apache: sudo systemctl stop apache2. For Nginx: sudo systemctl stop nginx.

Stop the Database: Stop MariaDB or MySQL to prevent further data writing. sudo systemctl stop mariadb or sudo systemctl stop mysql. 2. Remove Scheduled Tasks (Cron Jobs) uninstall observium ubuntu

Observium uses cron jobs for automated polling and discovery. You must delete these to prevent system errors. Locate and delete the Observium cron file: sudo rm /etc/cron.d/observium. 3. Delete the Installation Directory

By default, Observium is installed in the /opt/observium directory. Deleting this folder removes the application code, MIBs, and RRD (historical graph) data. Run the command: sudo rm -rf /opt/observium. 4. Drop the Database and User

Observium stores its configuration and device information in a MySQL/MariaDB database. Log into the database: sudo mysql -u root -p. Delete the database: DROP DATABASE observium;.

Delete the database user: DROP USER 'observium_rw'@'localhost'; (The username may vary; check your original config.php if unsure). Apply changes: FLUSH PRIVILEGES; followed by EXIT;. Ubuntu/Debian Install - Observium To uninstall Observium from Ubuntu, you must manually

Step 4: Remove Observium Database

If you want to completely remove Observium, you should also remove its database. To do this, run:

sudo mysql -uroot -p<password>

Replace <password> with your MySQL root password.

Once you are in the MySQL shell, run:

DROP DATABASE observium;

Then, exit the MySQL shell:

quit

Method 2: Uninstall Observium from Source

If you installed Observium from source, the uninstallation process is slightly different.

Special cases

  • Multi-instance or clustered setups: repeat removal for each node; check centralized DB and external storage locations.
  • Remote poller installations: remove poller-specific files and systemd services on poller hosts.
  • SNMP daemons: Observium does not require a dedicated SNMP daemon besides snmpd for local monitoring; only remove snmpd if you do not need it for other services.

Step 2: Remove Observium Packages

Now, remove the Observium packages using the following command:

sudo apt-get purge observium

This command will remove the Observium packages, configuration files, and dependencies. Replace &lt;password&gt; with your MySQL root password

Unable to stop services: "Failed to stop service: Unit not found"

You likely used cron instead of systemd. Skip to removing cron jobs.

Troubleshooting Common Uninstall Issues