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
-
Stop and disable the service:
systemctl stop safenix-agent systemctl disable safenix-agent -
Remove these service units:
/etc/systemd/system/safenix-agent.service /etc/systemd/system/safenix-agent-update.service /etc/systemd/system/safenix-agent-update.pathThen reload systemd:
systemctl daemon-reload -
Remove the Safenix program:
/usr/local/bin/safenix-agent -
Before removing the configuration, save the encryption password if you do not have another copy. The file
agent.envcontains 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. -
Remove the local state directory. Use the configured alternative path if
SAFENIX_DATA_DIRspecified one:/var/lib/safenix/ -
Removing the system user is destructive. Remove the system user, normally named
safenix, or the user selected with--service-userduring 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.