Skip to content

Hermes: Host Cleanup After Remote Migration

Goal: Remove the local Hermes installation and Ansible dependencies from sepia. Hermes is now accessed remotely via SSH from the macbook — no host-side Hermes binaries or venv remain on this server.

State Prior to Cleanup: - ~/.hermes/ — data directory (config, sessions, skills, memories) will be left in place for potential future Docker use, but the host installation inside it will be removed - ~/.hermes/hermes-agent/ — full git checkout + Python venv (the host installation) - /home/user/.local/bin/hermes — bash wrapper that calls the venv - /ansible/sepia/setup_hermes.yml — installs nodejs, npm, ripgrep, ffmpeg, xvfb, fonts, build-essential, python3-dev, libffi-dev, uv onto the host - Host packages: ffmpeg, nodejs 20, npm, ripgrep, xvfb, fonts-noto-color-emoji, fonts-unifont, build-essential, python3-dev, libffi-dev, uv


Task 1: Backup ~/.hermes

Objective: Create a dated backup of the entire Hermes data directory before making changes.

Files: - Create: /media/scratch/hermes-pre-cleanup-2026-05-17.tar.gz

Step 1: Create the backup

cd ~ && tar czf /media/scratch/hermes-pre-cleanup-2026-05-17.tar.gz .hermes/

Step 2: Verify backup integrity

tar tzf /media/scratch/hermes-pre-cleanup-2026-05-17.tar.gz | head -10
echo "---"
tar tzf /media/scratch/hermes-pre-cleanup-2026-05-17.tar.gz | wc -l

Expected: lists files and shows a reasonable count (~hundreds of files).

Step 3: Add cleanup reminder to HEARTBEAT.md

The backup can be pruned after 2 weeks if the cleanup is stable.


Task 2: Clean up the Ansible playbook

Objective: Remove/update the Hermes-specific Ansible playbook. The system deps it installed (nodejs, ripgrep, ffmpeg, xvfb, fonts, build-essential, etc.) were only there to support the local Hermes installation.

Context: Some of these packages may also be used by other things on the host: - nodejs/npm — Hermes LSP originally needed this, but LSP runs inside the container now - ripgrep — general-purpose CLI, may be useful to keep - ffmpeg — general-purpose CLI, may be useful to keep - build-essential, python3-dev, libffi-dev — dev toolchain, may be needed for other Python work - xvfb, fonts-noto-color-emoji, fonts-unifont — exclusively for Playwright browser rendering - uv — Python package manager, only used by Hermes

Step 1: Remove the Ansible playbook

rm /ansible/sepia/setup_hermes.yml

Step 2: Remove exclusively-Hermes host packages (safe to purge)

sudo apt-get remove -y xvfb fonts-noto-color-emoji fonts-unifont

Step 3: Leave generally-useful packages (ask user first)

The following packages are generally useful on any Linux workstation and may be used by other things. Rather than removing them, note they're no longer required by Hermes:

  • nodejs, npm — general JS runtime
  • ripgrep — fast grep
  • ffmpeg — media processing
  • build-essential, python3-dev, libffi-dev — development toolchain
  • uv — Python package manager (user explicitly requested to keep)

Step 4: Commit

cd /ansible
git add -A
git -c user.name="Hermes Agent" -c user.email="hermes@veenboer.xyz" commit -m "chore: remove Hermes host deps playbook (migrated to remote)"

Task 3: Remove the local Hermes installation

Objective: Clean up the host-side Hermes files that are no longer needed — the git checkout, Python venv, launcher wrapper, and any leftover artifacts.

Step 1: Remove the launcher script

rm /home/user/.local/bin/hermes

Step 2: Remove the cloned Hermes repo and its venv

rm -rf /home/user/.hermes/hermes-agent

This removes: - The full git checkout (~200MB) - The Python venv at .venv/ or venv/ - Compiled bytecode caches (__pycache__/) - The .git directory

Step 3: Remove LSP artifacts (if not used elsewhere)

rm -rf /home/user/.hermes/lsp/

Step 4: Verify hermes is no longer accessible from the host

which hermes

Expected: hermes not found — Hermes is now accessed remotely from the macbook via SSH.


Task 4: Add HEARTBEAT.md entry

Objective: Document the new remote-only Hermes setup.

Files: - Modify: /opt/docs/HEARTBEAT.md

Step 1: Add a Hermes cleanup note

Add entry to HEARTBEAT.md under a new "Cleanup Reminders" section:

## Cleanup Reminders

- [ ] **2026-05-31** — Prune Hermes backup: `/media/scratch/hermes-pre-cleanup-2026-05-17.tar.gz`

Task 5: Update MEMORY.md

Objective: Document the new deployment pattern in the knowledge base.

Files: - Modify: /opt/docs/MEMORY.md

Step 1: Add Hermes remote access note

Add a section under the appropriate area:

### Hermes Agent
- Hermes is no longer installed directly on sepia
- Access is via SSH from the macbook
- The `~/.hermes/` data directory remains on sepia for potential future Docker use

Step 2: Commit

cd /opt
git add docs/
git -c user.name="Hermes Agent" -c user.email="hermes@veenboer.xyz" commit -m "docs: add Hermes cleanup notes"

Rollback Plan

If the cleanup needs to be reversed:

  1. Restore from backup: tar xzf /media/scratch/hermes-pre-cleanup-2026-05-17.tar.gz -C ~/
  2. Reinstall launcher: ln -s ~/.hermes/hermes-agent/venv/bin/hermes ~/.local/bin/hermes
  3. Reinstall host deps: run the Ansible playbook if still available, or reinstall packages manually

The backup is preserved in /media/scratch/ for 2 weeks.