Skip to main content

Uninstall the Navin Manager

This page removes the Navin Manager server and the Navin agents. Removing a package stops and disables its service and keeps the settings and the data; a second, explicit step deletes them. It is done by a system administrator.

Before you begin​

  • Uninstall or move the managed services first (Services > service > Uninstall), then decommission each host (Hosts > host > Decommission): the agent stops and deletes its credentials.
  • Back up the database navin_manager and /etc/navin-manager if you may need them again.

Steps​

  1. Remove the agent from each host. The package stops and disables navin-manager-agent.service, navin-manager-agent-enroll.service and navin-manager-agent-enroll.timer. The state directory is kept.

    sudo apt remove navin-manager-agent-go # Ubuntu, Debian
    sudo dnf remove navin-manager-agent-go # RHEL family
    sudo pacman -R navin-manager-agent-go # Arch Linux

    Expected result: systemctl status navin-manager-agent reports that the unit could not be found.

  2. Remove the server package. The package stops and disables navin-manager.service and deletes /opt/navin-manager/venv; /etc/navin-manager, /var/lib/navin-manager and /var/log/navin-manager are kept.

    sudo apt remove navin-manager # Ubuntu (apt purge also deletes the conffile server.yaml)
    sudo dnf remove navin-manager # RHEL, Rocky Linux, AlmaLinux
    sudo pacman -R navin-manager # Arch Linux

    Expected result: systemctl status navin-manager reports that the unit could not be found.

  3. Delete the data (optional). These commands erase the settings, the master key, the internal CA, the mirror, the logs and the service account.

    danger

    Deleting /etc/navin-manager/master.key makes every secret sealed in the database unreadable. Deleting the agent state removes the identity of the host: it must register again with a new token.

    sudo rm -rf /etc/navin-manager /var/lib/navin-manager /var/log/navin-manager /opt/navin-manager
    sudo userdel navin-manager
    sudo rm -rf /etc/navin-manager-agent /var/lib/navin-manager-agent /var/log/navin-manager-agent # on each host

    For the local database created by navin-manager-db local:

    sudo runuser -u postgres -- psql -c 'DROP DATABASE navin_manager' -c 'DROP ROLE navin_manager'

    Then delete the block between # BEGIN navin-manager and # END navin-manager of the pg_hba.conf file (sudo runuser -u postgres -- psql -Atc 'SHOW hba_file').

Verify​

sudo navinctl status 2>/dev/null || echo "navinctl removed"
ls /etc/navin-manager /var/lib/navin-manager 2>&1

Expected result: no Navin unit is listed, and the directories no longer exist after step 3.

Next steps​

Troubleshooting​

SymptomCauseFix
navinctl is still present after removing the serverit ships with the agent packageremove the agent package too
The host appears again in Hosts after a new installthe agent state was keptdelete /var/lib/navin-manager-agent before registering with a new token, or keep it to keep the identity