kill/delete all sessions but the current
sessions
// what it does
The `-a` flag means "all other sessions": `tmux kill-session -a` kills every session except the current one, leaving the one you're attached to alive. Add `-t name` (`kill-session -a -t name`) to keep a different session instead of the current one. It's the one-shot way to clear out clutter after a session-heavy work sprint.
// shell
$ tmux kill-session -a// gotcha
`-a` does not mean "kill all" — it means "all but the surviving one," which trips people up. To destroy absolutely everything including the current session, use `kill-server` instead.