;; this will make the symbol my-nasty-variable's value void
(makunbound 'my-nasty-variable)
;; this will make the symbol my-nasty-function's
;; function definition void
(fmakunbound 'my-nasty-function)
from Bozhidar Batsov: https://batsov.com/articles/2012/10/20/emacs-tip-number-6-remove-variable-and-function-definitions/