Description
Describe the request
Arduino CLI caches the objects produced by compiling a sketch program under the temporary folder:
arduino-core-cache/
- Core objectsarduino-sketch-<hash>/
- Objects from sketch source files and library dependencies
These folders are intentionally left behind in the temporary folder after an Arduino CLI process exits so that they can be reused for subsequent compilations as applicable.
The proposal is for Arduino CLI to identify caches that have not been used recently and remove them.
🙂 Disk space will not be taken up by caches that are likely of no further value.
Describe the current behavior
The operating system or user are responsible for cleanup of the files stored by Arduino CLI in the temporary folder. This cleanup is not guaranteed to occur (Windows does not do it automatically and some Linux distros do it only on boot, which may occur rarely).
🙁 A significant amount disk space may be used up by the accumulation of caches.
🙁 A large number of objects in the temporary folder may impact system performance.
Arduino CLI version
Operating system
All
Operating system version
Any
Additional context
Originally proposed at https://forum.arduino.cc/t/cleanup-of-tmp-seems-inop-kubuntu-20-04/1072075/5
Additional reports:
- https://forum.arduino.cc/t/cleanup-of-tmp-seems-inop-kubuntu-20-04/1072075
- https://forum.arduino.cc/t/windows-10-ide-2-0-2-slow-start/1061136/4
- https://forum.arduino.cc/t/rc9-2-temporary-directories/1022812
- https://forum.arduino.cc/t/temporary-files-from-the-arduino-ide/1067309
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the latest nightly build
- My request contains all necessary details