I use emacs native-comp on windows, compiled on mingw64.

When I upgrade emacs packages, I often run into "too many open files" which breaks the
upgrade process. I can relaunch it as many times as necessary but then, I observe that
there seem to have some redundant files :
- in .emacs.d/elpa :
treemacs-20210324.2101
treemacs-20210329.2007
- in .emacs.d/eln-cache/xxx :
which-key-23f6ae93-26b66b60.eln
which-key-46d465c9-7566430a.eln
with-editor-6ad39f3c-1f6cab4d.eln
with-editor-e9d03336-734ea3f5.eln

I can cleanup easily the elpa directory thanks to the date, but it is harder for the eln-cache.

Is there a way to cleanup both directories so that there remain only the most recent file for each packageĀ  ?

Anyway, I guess emacs will choose to load the latest *eln file, right ?

Regards