Explaining the problem more in-depth than the titular definition:

Often I merge branches into master and want to prune based on that. M-p works fantastic for removing the remote branches (eg origin/mergedbranch) but not the local branch (eg mergedbranch) that referenced it before. I'm left with branches like the in the screenshot below.

There seem to be a lot of cli git commands such as this SO answer, but I was wondering if there was a magit equivalent.

enter image description here

2 Answers 2


The refs buffer has options to filter to merged branches. E.g.:


Then just highlight all those branches and type k


There's no such command, but it wouldn't be hard to create one if you know a little emacs lisp and look at other magit-branch-* commands and the SO answers you mentioned. If you do, then please submit a pull-request.

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.