I have created quite a few stashes and I wanted to drop all of them at once.
From terminal I could have done
git stash clear
I couldn't find a way to do it from magit.
I tried selecting all stashes and drop, but that didn't work.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
This assumes that you are using Magit v2.1 or greater, and it very much sounds like you are using an older version. So start by updating Magit.
If you want to drop more than one stash at a time, select all the stashes using the region and press k. It will ask you if you want to "drop N stashes?".
Another way to drop them all is by putting your cursor on the Stashes header and pressing k. (If you want to delete all stashes, then you should use this method, because it is more efficient than the other, which drops each stash individually.)
After browsing source code, I just wrote a function and it works fine
(defun magit-stash-clear () "Magit - drop all stashes." (interactive) (magit-run-git "stash" "clear"))