3

I noticed that successive versions of packages have been accumulating in my ~/.emacs.d/elpa folder, like so:

drwxr-xr-x   3 joon users 4,0K 20 avril 15:49 auto-complete-20150408.1132
drwxr-xr-x   3 joon users 4,0K 16 juin  17:14 auto-complete-20150615.34
drwxr-xr-x   3 joon users 4,0K  1 juil. 18:00 auto-complete-20150618.1949
drwxr-xr-x   2 joon users 4,0K 31 mai   21:53 avy-20150530.111
drwxr-xr-x   2 joon users 4,0K  4 juin  16:42 avy-20150603.919
drwxr-xr-x   2 joon users 4,0K 12 juin  17:07 avy-20150608.404
drwxr-xr-x   2 joon users 4,0K 16 juin  17:14 avy-20150615.1048
drwxr-xr-x   2 joon users 4,0K  1 juil. 18:00 avy-20150701.532
drwxr-xr-x   2 joon users 4,0K  7 juil. 19:53 avy-20150707.811

Is this normal? Is there a quick way to get rid of old versions ?

  • Do you get any error or warning in a buffer when upgrading a package? Try this out: (1) Delete the latest version of avy from your elpa dir (2) Restart emacs (3) M-x package-list-packages (4) Hit U and then x (5) You should will be asked to delete older versions after the latest versions are installed (6) Agree to the deletion. – Kaushal Modi Jul 7 '15 at 18:39
  • @kaushalmodi You can directly delete old versions, there's no need to remove the newest first. – lunaryorn Jul 7 '15 at 20:26
  • @lunaryorn If he doesn't delete the latest version, then the package manager will not prompt to upgrade (and then delete the older versions). I asked him to delete the latest version for him to test the upgrade+deletion process. – Kaushal Modi Jul 7 '15 at 20:47
  • I presumed you had suggested this as the way to delete obsolete versions, but I see that I've been mistaken. I'm sorry, please excuse the confusion. – lunaryorn Jul 7 '15 at 20:51
  • I tried what @kaushalmodi suggested. It did delete old versions of the package I had manually deleted, but it did not prompt me for confirmation. I had to check the Messages buffer to see that they had been deleted. I'm wondering whether this has something to do with my emacs version which is 25 since recently, and/or the fact that I use my .emacs.d folder synced betweed different machines, which may have slightly different versions of emacs (but all >= 25)... – Joon Kwon Jul 9 '15 at 21:15
3

That is unusual at least. Normally package.el asks you whether to delete old versions after upgrade, meaning that you'd have made a conscious decision to keep them.

Anyway, you can remove old versions explicitly with M-x list-packages, then ~ to mar obsolete packages for deletion and eventually x to perform this action. That should delete all old versions of your installed packages.

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.