0

Because of playing around with some configurations I have a lot of unused but installed packages.

Can I list them somehow to know which ones I can uninstall?

The important point here is that not all packages are loaded at start. Some are loaded on demand via use-package.

There is a M-x package-autoremove. This does not take care that some packages are loaded later via use-package. And there are also packages listet that are definitely in use: e.g. use-package, swiper, eglot, ... I also tried to use swiper and open a py-file (because of eglot) but the list that package-autoremove offers me does not change.

Maybe there is a way to tell use-package globally once to load everything and than do package-autoremove?

1 Answer 1

1

You can make use-package load everything thusly:

(setq use-package-always-demand t)
2
  • The list becomes shorter then but there are still packages that are definitly not "unused": e.g. swiper, eglot, use-package, org-roam-ui, company. Even after package-refresh-contents and opening a py-file and using swiper the list does not become shorter anymore.
    – buhtz
    Mar 14, 2022 at 8:49
  • 2
    Some of these packages may have been installed in such a way that emacs thinks they are "dependencies". The source of truth is the variable package-selected-packages: if a package is not listed here and is not a dependency of a package listed here, then package-autoremove thinks it is fair game for removal. Mar 14, 2022 at 12:47

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.