OSDeploy PSModule and site pages are currently in preview until mid-September
For the complete documentation index, see llms.txt. This page is also available as Markdown.

OSDeploy Core: Removing Boot Images

Review and remove completed OSDeploy Boot image builds that are no longer required.

Build-OSDeployBoot creates a new output directory for every build. Existing directories are not replaced; duplicate names receive a numeric suffix such as -001. Remove obsolete builds to recover space under:

C:\ProgramData\OSDeployCore\boot

Understand the Build Directory

A completed build can contain:

<build-name>\
|-- .core\
|-- .temp\
|   `-- logs\
|-- bootmedia\
|   `-- sources\
|       `-- boot.wim
|-- bootmedia.iso
|-- bootmedia_ca2023\
`-- bootmedia_ca2023.iso

The bootmedia_ca2023 content is present only when the selected WinRE source contains compatible updated Secure Boot files.

Deleting the complete build directory removes its WIM, ISO, logs, and generated media trees. It does not remove imported Windows OS or WinRE source images, shared Boot-Assets content, or cached applications.

Review Boot Images

Close active OSDeploy builds and open an elevated PowerShell 7 session.

List every build with its ISO files and approximate size:

The newest ISO is selected automatically by New-OSDeployHyperVM when -ISO is omitted. Confirm that an older build is not still required before removing it.

Select Builds to Remove

Use Out-GridView to select obsolete build directories:

If the selection is incorrect, run the selection command again.

Preview and Remove

Preview the deletion:

Confirm that every path is a direct child of C:\ProgramData\OSDeployCore\boot.

Remove the selected builds with a confirmation for each directory:

Do not remove the boot root. OSDeploy uses it for future build output.

Verify and Rebuild

List the remaining content:

Create replacement media when required:

OSDeploy creates a new build directory; it does not restore the deleted directory name or its previous selections automatically.

See Build-OSDeployBoot for build behavior and Update-OSDeployBootISO for rebuilding ISO files from a retained media tree.

Last updated

Was this helpful?