How to uninstall ngrok on a Mac, and remove the auth token it saved
ngrok is one 29 MB command, but its config file holds your account's auth token, and it may have installed itself as a service. The steps for all three.
How do I uninstall ngrok on a Mac?
- If you ever ran
ngrok service install, remove the service first:sudo ngrok service uninstall. - Remove the program:
brew uninstall --cask ngrokif Homebrew installed it, otherwise move thengrokfile you downloaded to the Trash.which ngrokshows where it is. - Delete the config:
~/Library/Application Support/ngrok. It holdsngrok.ymlwith your auth token.
What does ngrok keep on a Mac?
| Where | Size here | What it is |
|---|---|---|
/opt/homebrew/Caskroom/ngrok | 29 MB | The ngrok command, version 3.35.0 |
~/Library/Application Support/ngrok | 4 KB | ngrok.yml: auth token, saved tunnels |
| A system service | only if installed | Starts tunnels at boot when you used ngrok service install |
Older ngrok versions kept their config at ~/.ngrok2/ngrok.yml. Check there too if you have used ngrok for a few years.
Is deleting the config enough?
It removes the token from this Mac. The token itself still works for anyone who has a copy. If the Mac is being sold or returned, or the token was ever pasted somewhere public, reset it in your ngrok dashboard.
Find what is left in one look
Free Mac shows Homebrew's folders and Application Support on the Storage map and moves what you pick to the Trash. Before passing a Mac on, see cleaning a Mac before selling it.
Related: uninstall LICEcap and uninstall CrossOver.
Common questions
Where does ngrok store its auth token on a Mac?
In ~/Library/Application Support/ngrok/ngrok.yml for ngrok 3, or ~/.ngrok2/ngrok.yml for older versions.
Does brew uninstall ngrok remove my auth token?
No. Homebrew removes the program only. Delete the ngrok folder in Application Support to remove the token from the Mac.
How do I stop ngrok starting at boot?
If you installed it as a service, run sudo ngrok service uninstall before removing the program.