Skip to content

Delete unused compilation caches #2029

Closed
@per1234

Description

@per1234

Describe the request

Arduino CLI caches the objects produced by compiling a sketch program under the temporary folder:

  • arduino-core-cache/ - Core objects
  • arduino-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

38a0dfd

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:

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions