Clear the kill ring in emacs

How does one clear the kill ring in emacs? I use browse-kill-ring.el but the buffer it provides is read-only.


Solution 1:

For me, M-: (setq kill-ring nil) works. See also Internals of Kill Ring in the elisp manual. Don't ask me about side effects and security aspects, though.

Invoking the garbage collection right away as in

(progn (setq kill-ring nil) (garbage-collect))

makes the conses less accessible, so this might give you some degree of security.