kill/delete session mysession
sessions
// what it does
The `-t` flag targets a specific session by name, so `tmux kill-session -t mysession` destroys that session and everything in it without needing to be attached to it. `kill-ses` is an accepted abbreviation of `kill-session`. This is the scriptable way to clean up a named session from any shell.
// shell
$ tmux kill-ses -t mysession$ tmux kill-session -t mysession// gotcha
Session targets are prefix-matched, so a short or ambiguous `-t` value can kill the wrong session — and there's no confirmation before every process inside it is terminated.