when using C-x b followed by TAB, a list of buffers are brought up. Is there a way to quickly kill the buffers that are not needed (by pressing <delete> or d) on the selected buffer?

  • Try the ibuffer package instead.
    – Dan
    Sep 23, 2018 at 14:06
  • Yes if you are using ivy (which I totally recommend). This binds C-x b to ivy-switch-buffer and then, hitting M-o during buffer selection offers a range of actions including killing the selected buffer. Sep 23, 2018 at 15:17
  • Also yes if you use the builtin ido-mode. When you activate the mode it rebinds C-x b to ido-switch-buffer and when you run it you can press C-k to kill the buffer at the head of the completion list.
    – Omar
    Sep 23, 2018 at 15:28

1 Answer 1


What do you mean by "the selected buffer" here? In vanilla Emacs, C-x b TAB does not let you select/choose more than one buffer, and it just switches to that chosen buffer.

If you use Icicles then C-x b TAB lets you cycle among or otherwise move to any of the buffer-name candidates. You can then use S-<delete> to delete the buffer named by the current (selected) candidate.

Similar possibilities exist with some other packages that also provide a way to cycle or otherwise navigate to (select) a buffer-name candidate. This includes Ido (from vanilla Emacs), Helm, and Ivy.

In Icicles you can also use C-x k, filter buffer-name candidates in various ways, and then use C-! to kill all of the remaining candidate buffers at once.

See Icicles - Buffer-Name Input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.