Temporary Files from the Arduino IDE

I was lookin in my local app data temp folder for something else and noticed that I had a TON of folders in there from the Arduino IDE. There are approximately 1600 folders and files, most of which are from the IDE. They are folder names like "arduino-language-serverXXXXXXXXXX", "arduino-ide2-XXXXXXXXXXXXXXXXXXXXXXXXX", ".arduinoIDE-unsaved20221023-XXXXXXXXXXX" and "arduino-sketch-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" where the X are different sequences of numbers or numbers and letters. They go back a few months.
The only reason I ask is because they take up about 1.29 GB of space.

I see other posts in the forum going back to 2011 point out that this was a problem but it doesn't seem that there was ever anything done about it.

Yeah it's sloppy... although other programs also leave their poop there. I just deleted a slightly smaller temp cache, with no ill effects.

But someone should call for a cleanup on aisle 2.0.3 so we don't have to police this all the time.

  • Wes

I just logged a feature request yesterday :wink: Collect all temporary files in a temporary directory ยท Issue #1779 ยท arduino/arduino-ide ยท GitHub

1 Like

Thank you for doing that.

  • Wes

I think sterretje's proposal is good, and beneficial on its own. However, the problem of files that have no further use being left behind should also be resolved. I have submitted formal reports about this to the relevant repositories:

As for these:

and another you didn't mention:

arduino-core-cache

their persistence is actually very beneficial because it means the cached compiled files can be reused even across separate sessions of Arduino IDE. Arduino IDE 1.x did clean these folders on exit and this is why you might notice the average duration of compilations and uploads is significantly less when using Arduino IDE 2.x compared to Arduino IDE 1.x.

In this case where the files are intentionally preserved, sterretje's proposal would improve on the current situation by consolidating them under a single dedicated subfolder in the temporary folder.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.