Sign in Start free trial
← Help centre

How to uninstall the Safenix agent from a server

Remove the Safenix agent manually after disconnecting the server from the dashboard and preserving the encryption password if needed.

There is no Safenix uninstall command. The agent has no uninstall mode, and the installation script cannot remove itself. Remove the agent manually in the order below.

Before you start

In the Safenix dashboard, click Disconnect on the row for the server. This revokes the server's access and any recovery credentials already issued for it.

Removing files from the server does not disconnect it. Without this dashboard action, the server registration remains active and appears as no longer functioning.

Remove the agent

  1. Stop and disable the service:

    systemctl stop safenix-agent
    systemctl disable safenix-agent
  2. Remove these service units:

    /etc/systemd/system/safenix-agent.service
    /etc/systemd/system/safenix-agent-update.service
    /etc/systemd/system/safenix-agent-update.path

    Then reload systemd:

    systemctl daemon-reload
  3. Remove the Safenix program:

    /usr/local/bin/safenix-agent
  4. Before removing the configuration, save the encryption password if you do not have another copy. The file agent.env contains the backup encryption password and the server token. Without the encryption password, backups already uploaded become permanently unreadable, and Safenix cannot recover it.

    Remove the configuration directory:

    /etc/safenix/

    If the configuration contains a different value for SAFENIX_DATA_DIR, note that path before deleting the configuration.

  5. Remove the local state directory. Use the configured alternative path if SAFENIX_DATA_DIR specified one:

    /var/lib/safenix/
  6. Removing the system user is destructive. Remove the system user, normally named safenix, or the user selected with --service-user during installation.

What happens to uploaded backups

Removing the agent does not delete backups that have already been uploaded. Database copies and captured changes continue to expire by age according to the retention window of the plan. File backups remain until a Safenix operator removes them.

Still stuck?

If this page did not solve it, write to us and a person answers.

Contact