To close the current tmux window, run tmux kill-window, or press Ctrl+b then & to close the active window after confirming with y.

The kill-window command removes the targeted window from the tmux session. Killing a window destroys every pane inside it.
Inside tmux, you can close windows with key combinations or through the command prompt:
Ctrl+b & - Asks for confirmation in tmux's status line. Press y to confirm.Ctrl+b : then type kill-window and press Enter to close the active window immediately without a confirmation prompt. Use the -t target flag to specify windows by index, session name, or exact window name:
# Kill window at index 1 in the current session:
tmux kill-window -t :1
# Kill window at index 3 in the session named "work":
tmux kill-window -t work:3
# Kill window named exactly "logs":
tmux kill-window -t =logs
Add the -a flag to close every window except the specified target:
$ tmux kill-window -a -t :1
Running tmux kill-window -a without a target flag keeps the active window and closes all other windows in the current session.
Operations in tmux target different levels of the component hierarchy:
Ctrl+b x or tmux kill-pane targets individual terminal splits. Ctrl+b x is pane scope and may close the window if it is the only pane in that window. For split management details, see how to close a tmux pane. tmux kill-window destroys every pane in that window immediately. tmux kill-session removes the entire session container and all windows inside it. For broader cleanup, see how to kill a tmux session. To skip the prompt when using keyboard shortcuts, bind kill-window in ~/.tmux.conf:
bind-key & kill-window