4

I'm using Spacemacs, and I'm adding things to my dotspacemacs-configuration-layers. I can see its adding tons of packages to package-selected-packages.

If I comment out 1 or 2 layers (that I tested and don't want), when I reboot Emacs, I see it's "uninstalling packages," but for some reason they're still listed in package-selected-packages. How come it doesn't auto-remove them from here? I have so many packages for layers I was experimenting with that I don't want in there.

Thanks

3
  • Do the packages also stay in package-selected-packages if you M-x package-delete them? If not, then maybe it's simply a bug in Spacemacs and you should report it to them? – Stefan Dec 29 '17 at 2:13
  • Well, I don't use package-delete because I never installed the package to begin with, I installed the layer only. So if I add one single layer it might add 20 packages, and when they're all mixed together I have no idea what package goes with what... and theres also way too many of them to attempt to do it one by one (theres hundreds) – Tallboy Dec 29 '17 at 5:01
  • But to answer my question you just have to try it once with one of them. – Stefan Dec 29 '17 at 14:11
-1

You can try to put this into your configuration file of spacemacs:

(defun package--save-selected-packages (&rest opt) nil)

I don't know if this works since I don't use spacemacs.

2
  • 3
    This sounds like a bad idea, which would prevent package.el from adding things to package-selected-packages at all. e.g. Manually installing a package would no longer add it to the list. – phils Dec 28 '17 at 4:22
  • 1
    @phils Yes, it will disable the package-selected-packages list, this list feature was introduced into Emacs since 25 (25.1??, I don't remember exactly), I was annoyed back then since every time I installed and removed a package (specifically from package manager, but I always delete the package directory to uninstall it), it will change my init.el file automatically (you can move this into another file, but it still gets modified automatically). So I use the above snippet to avoid it, and I don't need the list. Anyway, I don't use Spacemacs, not sure whether this is what the poster wants. – CodyChan Jan 2 '18 at 2:57

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.