Uninstall the Linux agent

To remove Axoflow agent from a Linux host, complete the following steps.

  1. Log in to the Axoflow agent host and stop the axolet and axoflow-otel-collector services:

    Terminal window
    sudo systemctl disable --now axolet axoflow-otel-collector

    Removing the packages stops these services as well. Stopping them first makes sure that Axolet doesn’t register the host again after you delete it from AxoConsole, and that nothing writes to the data directories while you remove them.

  2. Delete the host from AxoConsole, so AxoConsole stops managing it.

    1. Open AxoConsole and select Sources. Alternatively, select ⌘/Ctrl + K, then enter the name of the host.
    2. Select the name of the host.
    3. Select ⋮ Host Options > Delete.
    4. Select Delete and revoke. Revoking the host prevents it from registering again with its current identity. If you plan to reinstall on the same host later, select Delete to keep the registration.
  3. Remove the Axoflow agent and Axolet packages:

    • On Red Hat Enterprise Linux 8 and 9, AlmaLinux, and Rocky Linux:

      sudo dnf remove axoflow-otel-collector axolet
    • On Red Hat Enterprise Linux 7:

      sudo yum remove axoflow-otel-collector axolet
    • On Debian and Ubuntu:

      sudo apt remove axoflow-otel-collector axolet

    Then reload the systemd configuration, so systemd drops the units of the removed packages:

    Terminal window
    sudo systemctl daemon-reload
  4. (Optional) Delete the data, the configuration, and the system user of Axoflow agent. The packages don’t remove these, so you can reinstall Axoflow agent and keep its data.

    CAUTION:

    Hazard of data loss!

    /var/lib/axoflow-otel-collector/storage contains the disk buffer of Axoflow agent: logs that it collected but hasn’t delivered to AxoRouter yet. Deleting this directory permanently deletes these logs. Make sure that you don’t need this data before running the command.

    If you don’t plan to reinstall it, run:

    Terminal window
    sudo rm -rf /etc/axoflow-otel-collector /etc/axolet /var/lib/axoflow-otel-collector
    sudo userdel axoflow-otel-collector

    If you’ve configured Axolet to run as non-root (using the AXOLET_USER and AXOLET_GROUP advanced options), also delete the sudoers file you’ve created for it. Depending on which instructions you’ve followed, the file is called axolet or configure-axoflow:

    Terminal window
    sudo rm -f /etc/sudoers.d/axolet /etc/sudoers.d/configure-axoflow

    This doesn’t delete the user that Axolet ran as. Delete that user only if nothing else on the host uses it.