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.
weshowe
December 19, 2022, 10:59pm
2
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.
weshowe
December 20, 2022, 2:28pm
4
Thank you for doing that.
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:
opened 06:27AM - 02 Jan 23 UTC
topic: code
type: imperfection
topic: theia
### Describe the problem
The Arduino IDE application creates some temporary fโฆ olders:
- 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](https://github.com/Marus/cortex-debug)
- Name: [`github-remote/`](https://github.com/eclipse-theia/theia/blob/v1.31.1/packages/plugin-ext/src/main/node/plugin-github-resolver.ts#L39)
- Name: [`http-remote/`](https://github.com/eclipse-theia/theia/blob/v1.31.1/packages/plugin-ext/src/main/node/plugin-http-resolver.ts#L37)
- Name: [`theia_upload/`](https://github.com/eclipse-theia/theia/blob/v1.31.1/packages/filesystem/src/node/node-file-upload-service.ts#L55)
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
1. Take note of the contents of your temporary folder.
- Windows:
```text
C:\Users\<user name>\AppData\Local\Temp
```
- Linux:
```text
/tmp
```
- macOS
```text
$TMPDIR
```
1. Start Arduino IDE.
1. Select **File > New** from the Arduino IDE menus.
**โ** This is treated as an unsaved sketch.
1. Select **File > Quit** from the Arduino IDE menus.
1. 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
76f9f63
### Operating system
- Windows
- Linux
- macOS
### Operating system version
- Windows 11
- Ubuntu 22.04
- macOS Ventura
### Additional context
This is similar to https://github.com/arduino/arduino-ide/issues/1779. However, the two are distinct in that https://github.com/arduino/arduino-ide/issues/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**](https://github.com/arduino/arduino-cli), [**arduino-fwuploader**](https://github.com/arduino/arduino-fwuploader), [**Arduino Language Server**](https://github.com/arduino/arduino-language-server), [**clangd**](https://clangd.llvm.org/)). 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:
- https://github.com/arduino/arduino-cli/issues/2029
- https://github.com/arduino/arduino-fwuploader/issues/158
- https://github.com/arduino/arduino-language-server/issues/145
#### Additional reports
- https://github.com/arduino/arduino-ide/issues/1795#issuecomment-1873679641
- https://github.com/arduino/arduino-ide/issues/1795#issuecomment-1874307075
- https://github.com/arduino/arduino-ide/issues/1795#issuecomment-2175708721
- 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
- https://github.com/arduino/arduino-ide/issues/1779
- https://github.com/arduino/arduino-ide/issues/2480
- https://forum.arduino.cc/t/is-pc-cleaning-software-interfering-with-ide-2-3-2/1251269
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
opened 07:17AM - 02 Jan 23 UTC
closed 12:57PM - 17 Aug 23 UTC
topic: code
type: imperfection
criticality: high
### Describe the problem
Arduino Language Server and [**clangd**](https://claโฆ ngd.llvm.org/) create some temporary files:
- ~Name format: `arduino-language-server2131811926/`~
- ~Arduino CLI sketch build folder~ (Solved by #146)
- Name format: `system-includes-0f3fe3.clangd`
- Created by **clangd**
- Name format: `preamble-4df37f.pch`
- Created by **clangd**
The first two of these persist even after the user exits the IDE.
The files accumulate over time, consuming significant amounts of disk space and may eventually cause a performance impact.
### To reproduce
1. Take note of the contents of your temporary folder.
- Windows:
```text
C:\Users\<user name>\AppData\Local\Temp
```
- Linux:
```text
/tmp
```
- macOS
```text
$TMPDIR
```
1. Start Arduino IDE 2.x.
1. Select **Tools > Board > Arduino AVR Boards > Arduino Uno** from the Arduino IDE menus.
**โ** This is only an arbitrary choice of a board that is supported by the language server.
1. Wait for the "**Building sketch**" and/or "**indexing ...**" operations indicated on the left side of the Arduino IDE status bar to finish.
1. Select **File > Quit** from the Arduino IDE menus.
1. Examine the contents of your temporary folder.
๐ Multiple additional `arduino-language-servernnnnnnnnn` folders are present.
๐ (If using Windows) Multiple additional `system-includes-nnnnn.clangd` files are present.
๐ The files produced by this single minimal demo consume a significant amount of disk space (on the order of > 0.5 MB on Windows).
### Expected behavior
Temporary files are cleaned up on exit.
### Arduino Language Server version
bdef5c27830b1d4a33908068ed87514757874052
### Operating system
- Windows
- Linux
- macOS
### Operating system version
- Windows 11
- Ubuntu 22.04
- macOS Ventura
### Additional context
I don't see the `system-includes-nnnnn.clangd` files in the temporary folder on Linux and macOS even while the IDE is running, so I am not sure whether they are never created at all, or whether they are stored in some other location.
---
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
---
Related:
- https://github.com/arduino/arduino-ide/issues/1779
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-language-server/issues?q=)
- [X] I verified the problem still occurs when using the latest version
- [X] My report contains all necessary details
opened 07:34AM - 02 Jan 23 UTC
closed 08:16AM - 10 Jan 23 UTC
topic: code
type: imperfection
### Describe the problem
Arduino Firmware Uploader creates some temporary folโฆ ders:
- Name format: `55770067919477794103602099745`
- Name: `fwuploader`
These persist even after the process completes.
The class of folder first on that list accumulates over time, which may eventually cause a performance impact.
### To reproduce
1. Take note of the contents of your temporary folder.
- Windows:
```text
C:\Users\<user name>\AppData\Local\Temp
```
- Linux:
```text
/tmp
```
- macOS
```text
$TMPDIR
```
1. Run the following command:
```text
arduino-fwuploader firmware list
```
1. Examine the contents of your temporary folder.
๐ An additional `55770067919477794103602099745` folder is present.
๐ The `fwuploader` folder is still present.
### Expected behavior
Temporary files are cleaned up on exit.
### Arduino Language Server version
2b1ab093e0e4da146c4d73964fa104fd5b776449
### Operating system
- Windows
- Linux
- macOS
### Operating system version
- Windows 11
- Ubuntu 22.04
- macOS Ventura
### Additional context
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 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
---
Related:
- https://github.com/arduino/arduino-ide/issues/1779
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-fwuploader/issues?q=)
- [X] I verified the problem still occurs when using the latest version
- [X] My report contains all necessary details
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.
system
Closed
July 1, 2023, 7:49am
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.