Arduino IDE 2.x - needs to do disk cleanup

I was having issues with my Windows 11 machine where my 500gb SSD used
for the c: drive was running out of space. Some system utilities would fail to run, such as the Dell system backup. It has been going on for awhile now.

Yesterday I was down to < 1GB left, so continued to do cleanup. I already moved my sketches folder over to d: I previous moved/installed apps to d: But was not making a dent in it.

I then looked at the Arduino15 directory:

C:\Users\kurte\AppData\Local\Arduino15

In the Staging directory and noticed it was taking up a lot of space. I went and deleted all of the files that were created before 2025, removed ESP32 stuff and looked again and my computer now had like 54GB free.

Note: the closed thread:

was a help in this regard. And I can still trim this area as it is still taking about
2GB of disk space.

I wish that the IDE would clean this up on it's own, especially if it detects that disk space is low.

I also noticed that there was a lot of space taken up for caching of cores/sketches
in the C:\Users\kurte\AppData\Local\arduino directory. I believe this used to be
contained within the Temp directory, which other disk cleanup utilities would probably give you the option to remove.

Note: the Temp directory still has some detritus with language servers and the like, many of them appear to be empty directories.

Sorry I know this is all probably known stuff, but it would be nice if others don't have to discover why their disks are full, especially as some of these archives like Zephyr and ESP32 are rather large. Like:

Edit: I should mention I am running IDE 2.3.7

You will find lot of junk in other areas such as windows update files etc etc .

Google will help you. Be careful if you upgrade the drive , I ended up buying windows again

I don't think that the IDE checks disk space :wink:

And I suspect that the reason that there is no cleanup is that one e.g. does not have to download the ESP32 platform again if one wants to switch between versions; if the version is available in staging it will be used instead of downloaded.

I'm quite sure that you know how to request features on github :wink:

Thanks all,

Thanks, those I know about, and things like Norton Utilities knows about those locations and gives you the options to remove them.

In my case I had already done that, I also looked at apps that were installed, removed some, some had the option to move to other drive, which I did...

Thanks, although I believe with some utilities like for flashing the Q, they added checks in, such that they don't take an hour to download only to find out they ran out of space.

I hear you, but I probably don't need 8 versions of it, and if I am running out of space, it would be nice if there was an easy way to weed through all of the stuff.

Yep although I often guess wrong on where to request things :laughing: ... IDE? CLI?

And I was hoping :crossed_fingers: someone like you or @ptillisch would come back and say, there is a command in the XYZ that already does this.

And I mainly posted this as I am guessing I am not the only one who is running
into this. And give people an idea on where to look to gain back space.

Thanks again.

When you update your hard drive generate a Linux install thumb drive first. If windoz fails you can install it. It's cost will be $0.00 yes, free. If windoz update is successful you can install Linux along with windoz if you want. Also you can boot from the thumb drive and just run Linux without installing. This will work with your machine as it is, it will not change windoz.

There is an Arduino CLI command: arduino-cli cache clean

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_cache_clean/

However, Arduino IDE does not utilize that feature.

Arduino CLI manages the download cache, so proposals for changes to how the cache is managed would generally need to be submitted to the Arduino CLI repository. However, I think the functionality that is already implemented in Arduino CLI is sufficient for Arduino CLI users. So in this case it seems like the path forward would be through work in the Arduino IDE codebase.

The most minimal solution would be the addition of a command to the Arduino IDE "Command Palette". No automagical cleaning, just the user manually triggering the command when they want to free up disk space.

Thanks, although I don't remember the last time I have had to reinstall windows. Occasionally I have had to rollback to before the last driver was updated.

I also have WSL installed on this machine, which I use for example to rebuild the ArduinoCore-zephyr "bootloaders" Although for main Zephyr work, I use the native zephyr build system which works on Windows.

On the other hand, I have had to reinstall Ubuntu, many times, when it updates and decides to use a different set of drivers example Video, with versions which did not work... Or going from one release to another, which the updates did not appear to work well, or the: apt update type stuff gets completely out of whack...

But I don't believe that disk space usage issue is specific to either Operating system.

Thanks, I have used that command on the Q, as the way to clear the Linux Monitor window. I have used it enough times, that I have updated my .bashrc file on the Q
To end with:

alias burn_bootloader='arduino-cli burn-bootloader -b arduino:zephyr:unoq -P jlink'
alias cleanup='arduino-app-cli system cleanup'

So at a command prompt, I can just type: cleanup

edit: Oops, different cleanup!...

Thanks again!

arduino-app-cli system cleanup is different from arduino-cli cache clean.

arduino-app-cli system update does clean the download cache after updating the arduino:zephyr platform:

However, arduino-app-cli system cleanup does not clean the download cache. It is not considered necessary for it to do so because operations performed using Arduino App CLI don't leave a cache.