fghj uninstall
sudo fghj uninstall [-y] [--keep-ca] [--keep-state | --keep-workspaces]Removes everything fghj installed on this machine except the binaries and your Docker resources.
Removing the binaries alone leaves fghj’s two biggest artifacts behind, and neither is easy to find later:
- a trusted root certificate: in your login keychain on macOS; on Linux in the system store and in your browsers’ databases
/var/lib/fghjd, which holds that CA’s private key, every wired workspace, and all run state
Leaving those behind means a trusted root whose key is still sitting on
disk. This command is the one that clears them. On macOS run it before
brew uninstall, which runs unprivileged and can’t; on Ubuntu apt remove
runs it for you.
What it does, in order
Section titled “What it does, in order”- Stops
fghjdif it is running, so the daemon unwinds its own system configuration. - Clears the managed
/etc/hostsblock, the OS DNS routing (/etc/resolver/fghj*and thelo0aliases on macOS, thefghj0link on Linux) directly. This is belt and braces: a daemon that was killed withSIGKILLnever ran its own teardown, so these can still be installed with nothing alive to remove them. Each step is a no-op when there is nothing to undo. - Deletes every
fghj local CAcertificate from the trust store: on macOS from the login keychain of every wired workspace’s owner and of the user who ransudo(and from the System keychain, where fghj 0.2.0 and earlier put it); on Linux from/usr/local/share/ca-certificatesand from those same users’ browser databases. - Has fghjd remove fghj’s sidecar containers, which hold the signing CA’s
key. Your own containers, networks and volumes stay. If fghjd isn’t
running, it can’t, and the warning gives the
docker rmcommand that does. - Removes
/var/lib/fghjd, and fghj’s own database in each wired workspace (.fghj/fghj.db). Nothing else in a workspace is touched.
Once it’s done, no CA of fghj’s exists anywhere: not trusted, not on disk, not in a running container.
The order matters. A live fghjd would re-mint and re-trust a CA on its
next reconcile, undoing step 3 — so the daemon goes down first.
Step 3 loops rather than deleting once. security delete-certificate
removes a single match per call, and a machine that has been through
several installs can hold several: deleting ca/ makes the next start mint
a new CA and trust that one too.
Options
Section titled “Options”| Flag | Effect |
|---|---|
-y, --yes | Skip the confirmation prompt |
--keep-ca | Leave the root CA trusted — on macOS, avoids a fresh keychain authorization prompt when reinstalling |
--keep-state | Leave /var/lib/fghjd in place — keeps every wired workspace and the CA keys, and leaves the sidecars running |
--keep-workspaces | Keep only the workspace index and daemon settings; every CA file and key still goes, and so do the sidecars. A reinstall mints a new CA and still knows your workspaces. Removing the Ubuntu package runs this |
Without -y it prints exactly what it will delete and waits. Anything but
y or yes — including a bare Enter, or a closed stdin under a pipe or in
CI — aborts without removing anything.
It needs root, and won’t escalate for you
Section titled “It needs root, and won’t escalate for you”All of its jobs require it: the system trust store, /etc, and
/var/lib/fghjd. Run unprivileged, it refuses and tells you what to run:
$ fghj uninstallError: fghj uninstall needs root — it removes a certificate from the Systemkeychain, /private/var/lib/fghjd, and fghjd's system configuration.
Run: sudo fghj uninstallIt deliberately does not re-exec itself under sudo. A command that
silently escalates in order to delete a trusted root certificate is the
wrong shape, however convenient.
What it does not remove
Section titled “What it does not remove”The binaries. Use brew uninstall fghj on macOS. On Ubuntu,
sudo apt remove fghj removes them and runs this command first.
Docker containers, networks, volumes and images. Not an oversight: a
named volume is designed to outlive its container and may hold a
database you still want, and fghj identifies its own resources by an
fghj- name prefix — a filter, not proof of ownership. Deleting data on a
name match is not a call an uninstall command gets to make. It points you
at them instead:
docker ps -a --filter "name=^fghj-" --format '{{.Names}}'Repositories fghj cloned into your workspace. They are ordinary git clones that may hold unpushed work.
See What fghj touches, and how to remove it for the full inventory and for doing any of this by hand.