Skip to content

Instantly share code, notes, and snippets.

@heathdutton
Created July 1, 2026 18:38
Show Gist options
  • Select an option

  • Save heathdutton/12466b3fe4117eb75d186e1b53d6d66f to your computer and use it in GitHub Desktop.

Select an option

Save heathdutton/12466b3fe4117eb75d186e1b53d6d66f to your computer and use it in GitHub Desktop.
Deskflow full reset to defaults (macOS) - run on both server and client
#!/usr/bin/env bash
# Deskflow full reset to defaults (macOS). Run on BOTH the server and the client.
# Backs up ~/Library/Deskflow (config + TLS certs + trust store) before wiping,
# then clears GUI prefs + window state so the next launch is a clean first-run.
set -euo pipefail
echo "Resetting Deskflow to defaults..."
# Quit anything Deskflow-related (GUI, core, legacy server binary).
killall Deskflow deskflow-core deskflow-server 2>/dev/null || true
# Back up the whole config dir (certs, fingerprints, server layout) just in case.
ts="$(date +%Y%m%d-%H%M%S)"
if [ -d "$HOME/Library/Deskflow" ]; then
mv "$HOME/Library/Deskflow" "$HOME/Deskflow-backup-$ts"
echo "Backed up old config to ~/Deskflow-backup-$ts"
fi
# Clear GUI prefs + window state, and flush the macOS prefs cache so it can't
# rewrite the old plist from memory.
defaults delete org.deskflow.deskflow 2>/dev/null || true
rm -f "$HOME/Library/Preferences/org.deskflow.deskflow.plist" \
"$HOME/Library/Preferences/State/Deskflow.state"
killall cfprefsd 2>/dev/null || true
echo "Deskflow reset complete. Relaunch the app and reconfigure (server first)."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment