With M-x ibuffer one can filter on pathname components. The commands I use are ~~~ /f filter using part of full pathname // filter off /g create named filter group and move group to top of ibuffer C-k RET kill filter group (the one under the cursor) C-y RET yank filter group ~~~