Description
Describe the problem
The Arduino IDE application creates some temporary folders:
- Name format:
arduino-ide2-0694b57a37dbff387afae61891204d75/
- One folder created for each IDE window that is opened.
- Name format:
.arduinoIDE-unsaved202301-12372-u0dvfq.rtr7i/
- One folder created for each unsaved sketch
- Name format:
gdb-server-console-6800.log
- Created by the Cortex-Debug extension
- Name:
github-remote/
- Name:
http-remote/
- Name:
theia_upload/
These persist even after the user exits the IDE.
In the case of the first two on the list above, the folders accumulate over time, which may eventually cause a performance impact.
To reproduce
- Take note of the contents of your temporary folder.
- Windows:
C:\Users\<user name>\AppData\Local\Temp
- Linux:
/tmp
- macOS
$TMPDIR
- Windows:
- Start Arduino IDE.
- Select File > New from the Arduino IDE menus.
ⓘ This is treated as an unsaved sketch. - Select File > Quit from the Arduino IDE menus.
- Examine the contents of your temporary folder.
🐛 An additional folder is present for each of the IDE windows you opened.
🐛 An additional folder is present for each of the unsaved sketches you opened.
🐛 An additional gdb-server-console-nnnn.log
file is present for each of the IDE windows you opened.
🐛 The github-remote/
, http-remote/
, and theia_upload/
temporary folders Arduino IDE creates are still present
Expected behavior
Temporary files are cleaned up on exit.
Arduino IDE version
Operating system
- Windows
- Linux
- macOS
Operating system version
- Windows 11
- Ubuntu 22.04
- macOS Ventura
Additional context
This is similar to #1779. However, the two are distinct in that #1779 allows for easier management of the temporary files during runtime (e.g., configuring antivirus software exclusions) and manual cleanup of files leftover when the application is not able to perform an automatic cleanup (e.g., power outage, crash).
Some operating systems may eventually do a clean-up on the temporary folder, but this is not guaranteed. It is better for the application to take care of clean up of any temporary files once they are no longer needed.
Additional temporary files are generated by tools used by Arduino IDE (e.g., Arduino CLI, arduino-fwuploader, Arduino Language Server, clangd). Cleanup of those file should be the responsibility of the individual tool, not Arduino IDE, so cleanup of those files is out of scope for this issue.
They are tracked in the repositories of those projects:
- Delete unused compilation caches arduino-cli#2029
- Temporary files are not cleaned up arduino-fwuploader#158
- Temporary files are not cleaned up arduino-language-server#145
Additional reports
- Temporary files are not cleaned up #1795 (comment)
- Temporary files are not cleaned up #1795 (comment)
- Temporary files are not cleaned up #1795 (comment)
- 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
- https://forum.arduino.cc/t/too-many-temporary-files-makes-error-informational/1104581/3
Related
- Collect all temporary files in a temporary directory #1779
- Log files are not cleaned up #2480
- https://forum.arduino.cc/t/is-pc-cleaning-software-interfering-with-ide-2-3-2/1251269
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details