Remove a Node or Deployment#
Use this guide to decommission a node or a deployment. The work has two parts:
Automated. The installer removes the state that it created on the central Hermes host. This is safe to repeat, and a new installer run recreates it.
Manual. You clean up the edge node and the shared parts of the central host. These steps delete data or affect other software, so the installer never does them.
Caution
Run the automated step before you remove the node from hosts.yaml. The installer finds
what to remove from the inventory. Remove the inventory entry only at the end. If you keep
it, the next installer run deploys the node again.
Automated: remove the central-host state#
This step never connects to a node. It does not stop applications, delete files on a node, or change SSH keys.
For each selected deployment, it removes:
Item |
Location |
|---|---|
The SSH tunnel |
The |
The MCP registration |
The |
The node profile |
The Hermes profile of the deployment |
The stored MCP credential |
|
The pinned certificate and the deployment log |
|
It does not touch the default profile, the model configuration, the persona, other deployments, or the WebUI.
Select the deployment. Without
--nodeand--recipe, the command applies to every deployment in the inventory.central Hermes host
./fleet-setup.sh --teardown --node node1
The output lists each step with
PLAN:. It then asks for confirmation. The command needs an interactive terminal.Read the plan. Make sure that it names only the deployments that you want to remove. Answer
nto cancel. Nothing changes.Answer
yto apply the plan.Check the result:
central Hermes host
systemctl --user list-units 'fleet-tunnel@*' hermes profile list
The tunnel and the profile of the removed deployment must not be listed.
Manual: clean up the edge node#
Do these steps in order. The installer leaves all of this in place on purpose.
Back up what you must keep. The application checkout contains the
.envfile with the generated credentials, downloaded models, data volumes, and your local edits. Deleting the checkout removes them.Stop the application. Run the stop command of the application in its directory. For the multimodal application, use
make down. Do not remove the Docker volumes unless you are sure that you do not need the data. Volumes hold the time-series, model, and media data.edge node
cd ~/fleet-deployments/<deployment-name>/checkout/<app-directory> make down docker ps
docker psmust not list containers of the application.Delete the checkout. Review the content first. The checkout is under
~/fleet-deployments/<deployment-name>/.edge node
ls -la ~/fleet-deployments/<deployment-name>/ rm -rf ~/fleet-deployments/<deployment-name>
If
rmreportsPermission denied, containers created files that another user owns. Ask an administrator to remove them after you confirm the path. Do not use a wildcard or a path outside the deployment directory.A deployment that uses
app_pathis managed outside the installer. Do not delete its directory unless you own it.Remove unused Docker images and volumes. Docker resources can be shared with other workloads. List them and remove only the ones that belong to the application. Do not run
docker system pruneon a shared node.edge node
docker images docker volume ls
Remove the central host key. The installer added the public key of the central host to
~/.ssh/authorized_keysof the node user. Find the key by its comment, which is theuser@hostof the central host, orfleet-setup@<host>for a key that the installer created. Then delete only that line with an editor. Skip this step if the central host must keep access.edge node
grep -n '<key-comment>' ~/.ssh/authorized_keys
Rotate the credentials if the node stays in use. The application credentials were stored in the checkout
.envfile and on the central host. After the removal of the central state, the central host no longer has them. Rotate them if you reuse the application, or if the node leaves your control.Leave the packages and the Docker group alone. The installer can add
make,curl,git, Docker Engine, and Docker Compose, and add the user to thedockergroup. Other software can depend on them.
Manual: clean up the central host#
Remove the node from the SSH known hosts.
central Hermes host
ssh-keygen -R <node-host>
Remove a dedicated SSH key. Do this only if the inventory has an
identity_filethat was used for this node alone, and nothing else uses it. The default key,~/.ssh/id_ed25519, can be in use elsewhere. Keep it.Restore user lingering. After you remove the last tunnel, decide whether the central user needs lingering. See Restore user lingering.
Review the Hermes chat history. The chats of the default profile can mention the node and its data. Keep or delete them, according to your records policy.
Remove the cached skill checkout. Optional. The cache at
~/.cache/fleet-setup/is safe to delete. A later installer run downloads it again.
Finish#
Remove the node, or the deployment, from hosts.yaml. Then run ./fleet-setup.sh --list to
check that the inventory is valid and no longer names it.
central Hermes host
./fleet-setup.sh --list