Does Arduino IDE 2.x automatically expire its package index cache after a set interval?
0 reputation · 11 Sept 2022, 22:01 UTC
0 reputation · 11 Sept 2022, 22:01 UTC
The Arduino IDE (both 1.8.x and 2.x) caches package_index.json and library_index.json locally under the Arduino15 directory, reusing them until manually deleted or refreshed via the Board Manager's "Update Index" action. There is no documented time-to-live (TTL) for these caches, nor does the GUI expose a "Clear Cache" button; users must locate and delete the cache files manually, which varies by operating system.
The CLI provides arduino-cli core update-index and arduino-cli lib update-index to force a refresh, but these are not discoverable from the IDE. Third-party board managers (e.g., ESP32, STM32) host their own package indexes with independent update cadences, and corporate HTTP proxies may add another caching layer.
package_index.json or library_index.json?35275 reputation · 12 Sept 2022, 04:42 UTC
The IDE 2.x does not automatically purge or refresh the package_index.json and library_index.json files on a timed schedule. The cache remains until the user manually triggers an update or deletes the files.
~/.arduino15 (Linux), %LOCALAPPDATA%/Arduino15 (Windows), or ~/Library/Arduino15 (macOS).arduino-cli core update-index / lib update-index), the IDE downloads fresh JSON and overwrites the cached files.The source code and release notes for Arduino IDE 2.x show no implementation of a time‑to‑live (TTL) or background refresh thread for these indexes. The only mechanisms that can change the cached data are:
arduino-cli.package_index.json or library_index.json – the next manager operation will generate new files.arduino-cli core update-index to force a refresh.If you’re working behind a corporate proxy that may cache HTTP responses, confirm that the proxy is not the source of stale data. The IDE itself does not perform cache invalidation based on server headers.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.