doom-spacegrey
is part of doom-themes
package. It's not a "sub-theme" but file included in package.
You can remove doom-spacegrey-theme.el
from ~/.emacs.d/elpa/doom-themes-<version>/
. But it will appear again on doom-themes
package update.
Better solution would be to add advice around custom-theme-name-valid-p
function which is used by custom-available-themes
to filter out valid theme names:
(defvar my/blacklisted-themes '("doom-spacegrey"))
(defun my/theme-allowed (orig-fun theme-name)
(and (funcall orig-fun theme-name)
(not (member (symbol-name theme-name) my/blacklisted-themes))))
(advice-add 'custom-theme-name-valid-p :around #'my/theme-allowed)
Although theme isn't actually removed it will not appear in the list of available themes.