Hi fellow Emacs users,

I'm experience very slower performance of 25.1 but a startup with -Q indicated the problem is probably caused by my old packages. (Similar scenario: https://www.reddit.com/r/emacs/comments/55ork0/is_emacs_251_noticeably_slower_than_245_on_windows/)

Removing all the old byte-compiled package files in ELPA (and perhaps also in other folders? please suggest) will be necessary. But I'm paranoid as to keeping some older contents suited version 24 will also affect version 25. So I am planning to refresh every packages to their latest versions, and remove those obsolete packages with obviously suspended maintenance.

I foresee that I need to remove the content of the whole ELPA folder manually; but for re-downloading the packages to the ELPA folder, I don't want to compare a previously saved list visually and add them one by one manually in package-list-packages.

Is there a smarter way?

Thanks for your help.

  • It's not clear what you're asking. You can update all packages with newer versions available by calling M-x package-list-packages , entering U to mark all updates, and then x to actually update. This will leave all the other packages as they are. Is that what you want?
    – Tyler
    Oct 18, 2016 at 18:16
  • I did that. The ELPA folder is the folder for 24.5 too, and if there are packages compiled for 24.5 and still not yet updated for this 25.1 version then I want to delete them and re-install them. This is a question of how I can do this task for all packages without manually selecting them out of the repository list.
    – menuhin
    Oct 18, 2016 at 20:52
  • I see. You can recompile all the .el files with (byte-recompile-directory "<path-to-elpa-directory>" 0 t). No need to reinstall the packages if they haven't changed, the only thing you need to update is the .elc files.
    – Tyler
    Oct 18, 2016 at 21:26

1 Answer 1


I found only 1 way to refresh the content of the ELPA directory (not only the compiled .elc files in each package folder) without having to manually work on it in M-x package-list-packages. There is a bootstrapping method used by John Wiegley in his use-package:

;; https://github.com/jwiegley/use-package
  (require 'use-package))
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))

;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
  (package-install 'use-package))

One can bootstrap all the packages in his setup on .emacs however the work required a list of these packages prepared beforehand and writing the bootstrapping routine for every packages in the .emacs file - which can be more work than just downloading these packages again.

The advantage of this bootstrapping approach is, when it is correctly setup, one can remove all the content of the ELPA folder and the packages will be downloaded again automatically during startup. This is also very convenient for migration.

  • The problem of my Emacs being super slow (esp. in Org mode) is caused an outdated package that uses UTF-8 display.
    – menuhin
    Dec 15, 2016 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.