In the Arduino IDE 2.x, board packages (cores/platforms installed via Boards Manager, like esp8266, esp32, AVR, etc.) are stored in the data folder, which defaults to:

C:\Users\<YourUsername>\AppData\Local\Arduino15
C:\Users\<YourUsername>\AppData\Local\Arduino15\packages

You can change it by editing a configuration file used by arduino-cli (the backend tool for Boards Manager in IDE 2.x).

Step-by-Step: Move the Board Packages / Data Folder (Arduino IDE 2.x on Windows)

  1. Close Arduino IDE completely.

  2. Locate and edit the arduino-cli.yaml file:

    • Path:
      C:\Users\<YourUsername>\.arduinoIDE\arduino-cli.yaml
      
      • Note: The .arduinoIDE folder is hidden by default.
        To see it in File Explorer: View tab → check “Hidden items”.
    • If the file doesn’t exist yet → create it as a plain text file named arduino-cli.yaml (use Notepad, not Word).
  3. Open the file in a text editor (Notepad, VS Code, etc.).

  4. Add or modify the directories.data line:

    • Add this (or change the existing one):
      directories:
        data: D:\ArduinoData\Arduino15   # ← Change this path to wherever you want
      
      • Example for D: drive:
        directories:
          data: D:\Arduino\IDE-Data
        
      • Full minimal example file (if creating new):
        directories:
          builtin:
            libraries: d:\Arduino\Arduino15\libraries
          data: d:\Arduino\Arduino15
          downloads: d:\Arduino\Arduino15\staging
          user: d:\Arduino
        
  5. Create the new folder you specified (e.g., D:\ArduinoData) if it doesn’t exist yet.

  6. (Recommended but optional) Move existing packages to avoid re-downloading everything:

    • Copy (or cut-paste) the entire contents of the old folder:
      C:\Users\<YourUsername>\AppData\Local\Arduino15
      
      to your new location (e.g., D:\ArduinoData).
    • Especially important: copy the packages subfolder — that’s where boards like esp8266 live.
  7. Start Arduino IDE again.

    • Go to Tools → Board → Boards Manager.
    • Search for something (e.g., “esp8266”) — it should now use/show packages from the new path.
    • If you moved the files, everything should appear as already installed. If not, it will re-download to the new location.

After the change, new board installs/updates go to the new packages folder.

Sketchbook/libraries are separate — still changed via File → Preferences → Sketchbook location (e.g., to move user libraries/sketches).

  • arduino-cli.yaml can have other settings too (e.g., directories.downloads for staging files, but data is the main one for packages, directories.user for user download lib packages).