Each framework upgrade can leave another set of development tools on the computer that builds device firmware. The new esphome prune command removes versions no longer used by ESPHome’s default builds, while --dry-run shows the proposed cleanup without deleting anything.
Jonathan Swoboda tested it after twenty builds spanning older and current frameworks. The installed tools shrank from 18.2 GB to 6.6 GB in three seconds; rebuilding the default configurations then required no framework downloads or reinstalls.
Do not run cleanup during a build. A non-default version pinned in a device configuration can be removed and will download again when next needed. This is a command-line tool; running it from Device Builder is separate work.