Killing a tmux session removes a workspace that is no longer needed and stops every shell, editor, and job still running inside its windows and panes. It is the cleanup command used after work has been detached, finished, or moved to another session.
The kill-session command destroys one target session and detaches any clients attached to it, but it does not remove windows that are still linked to some other session. Using the session name with -t keeps the action narrow and makes the next tmux list-sessions check easy to read.
Because the command ends the processes inside the target session, the safe flow is to list the current sessions first, kill only the intended name, and verify what remains afterward. In the default tmux setup, removing the last session makes the server exit, so a follow-up list returns a no-server message instead of another session list.
Related: How to list tmux sessions
Related: How to attach to a tmux session
$ tmux list-sessions build: 1 windows (created Wed Apr 15 14:33:36 2026) ops: 1 windows (created Wed Apr 15 14:33:37 2026)
The name before the colon is the -t target for kill-session.
$ tmux kill-session -t build
Every window, pane, and running process inside build ends immediately unless that window is also linked to another session.
$ tmux list-sessions ops: 1 windows (created Wed Apr 15 14:33:37 2026)
$ tmux kill-session -a -t keep
The -a flag kills all sessions except the target given with -t.
$ tmux list-sessions keep: 1 windows (created Wed Apr 15 14:33:38 2026)
$ tmux kill-session -t missing can't find session: missing
Related: How to list tmux sessions
Related: How to create a tmux session
$ tmux list-sessions no server running on /tmp/tmux-1000/default
The numeric socket directory varies by user account, but the message itself is the normal sign that no tmux sessions remain.