Skip to content

Uninstalling

On this computer

hfim uninstall lists what hfim installed on this computer and, with --yes, removes it:

What Where
the install home: SDK releases, the simulator registry, native simulator builds, Server Entries and hfim's state ~/.hfim, or HFIM_HOME
native simulator builds outside the install home HFIM_NATIVE_ROOT/<package>/<version>, and ~/sim/<package>/<version> from an older installation
Docker images whose name starts with hfim- the simulator images and the Build Images of templates
hfim uninstall           # lists them; removes nothing
hfim uninstall --yes     # removes them
pipx uninstall hfim-cli # last: removes the hfim command itself

Campaign directories are never touched: their campaigns, benchmarks, results and Goldens stay where they are. A native build that a package manifest names outside hfim's own directories is left in place; the list says which and why.

On a Server

hfim uninstall refuses on a Server (a machine with /etc/hfim/server.yaml): a Server holds the data of every Member. The administrator takes it down with the steps below, as root, in the workspace of Server administration: Install.

This procedure deletes accounts and stored results. End-to-end removal on a server is unverified.

  1. Let the Members fetch their results. Each Member runs, on their own computer, in each campaign directory:
hfim runs --on <server> --all       # every Submission of this Member on the Server
hfim runs fetch <id>                # copies its results into this campaign directory
  1. Remove every account. This stops the account's Gateway and worker fleet, removes its Redis user, its Linux user fim-<name>, its User Base /srv/hfim/users/<name>/ (results included) and its key pair. In the docker form, stop its containers first.
cd ~/hfim-v<version>/hfim-server
sudo docker compose -p fim-<name> down       # docker form only
sudo ./add-user.sh <name> --remove
  1. Stop what serves the whole Server.
sudo systemctl disable --now fim-public_endpoint    # when the plan has access.port
sudo docker rm -f fim-redis
  1. Remove the files hfim installed. /opt/hfim holds the Server Releases, the Machine Registry and the native simulator builds (/opt/hfim/sim); /var/lib/hfim the Redis data; /srv/hfim what is left of the User Bases.
sudo rm -rf /etc/hfim /opt/hfim /var/lib/hfim /srv/hfim
sudo rm -f /etc/systemd/system/fim-gateway@.service /etc/systemd/system/fim-worker@.service /etc/systemd/system/fim-public_endpoint.service
sudo rm -f /etc/ssh/sshd_config.d/50-hfim.conf
sudo systemctl daemon-reload
sudo systemctl reload ssh
sudo groupdel fim-users
  1. Remove the images. The Server Images of the docker form are named hfim-server:<release>.
sudo docker image ls 'hfim-*'
sudo docker image rm redis:7 $(sudo docker image ls -q 'hfim-*')
  1. Remove the workspace ~/hfim-v<version> of the administrator.