> For the complete documentation index, see [llms.txt](https://www.osdeploy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.osdeploy.com/osdeploy-insider/how-to/core-winpe-driver-cleanup.md).

# Core WinPE Driver Cleanup

Remove obsolete WinPE driver versions from the OSDeploy Core library.

`Update-OSDeployCoreDrivers` stores each driver release in a separate versioned folder. New releases do not replace older folders. Over time, the library can contain multiple Dell, HP, Intel, and Microsoft driver versions.

Remove obsolete versions to reduce disk usage and keep the driver selection list in `Build-OSDeployBoot` easy to identify.

{% hint style="warning" %}
Keep the newest known-working version of each driver family and architecture. Do not delete the `winpedrivers-amd64` or `winpedrivers-arm64` roots. A newer version number is usually the current release, but verify the version you use before deleting an older folder.
{% endhint %}

## Driver Folder Location

Expanded driver folders are stored by architecture:

```
C:\ProgramData\OSDeployCore\boot-assets\winpedrivers-amd64\
C:\ProgramData\OSDeployCore\boot-assets\winpedrivers-arm64\
```

These roots contain downloaded, exported, and user-managed packages for the matching architecture. Legacy root-level and `repository` driver folders are migration sources, not current authoring destinations.

A folder name contains the driver family and version. For example:

```
dell-A09
dell-A10
hp-3.30
hp-3.40
intel-ethernet-31.1
intel-ethernet-31.2.2
```

In these examples, `dell-A09`, `hp-3.30`, and `intel-ethernet-31.1` are older candidates. Keep a previous release when it is still required for tested hardware or rollback.

## Review Installed Drivers

Close any active OSDeploy build, then open an elevated PowerShell 7 session.

List the expanded folders for both architectures:

```powershell
$DriverRoots = Get-Item "$env:ProgramData\OSDeployCore\boot-assets\winpedrivers-*"

Get-ChildItem -Path $DriverRoots.FullName -Directory -ErrorAction SilentlyContinue |
	Select-Object Name, Parent, LastWriteTime, FullName |
	Format-Table -AutoSize
```

Compare folders belonging to the same driver family. Use the version in the folder name to identify the release. Treat `LastWriteTime` only as supporting information because copying or re-expanding a folder can change that date.

## Select Old Driver Folders

Use `Out-GridView` to select only the obsolete versioned folders. Hold **Ctrl** to select multiple rows, then select **OK**.

```powershell
$OldDrivers = Get-ChildItem -Path $DriverRoots.FullName -Directory -ErrorAction SilentlyContinue |
	Select-Object Name,
		@{Name = 'Architecture'; Expression = { $_.Parent.Name -replace '^winpedrivers-', '' } },
		LastWriteTime,
		FullName |
	Out-GridView -Title 'Select old WinPE driver folders to remove' -PassThru
```

Review the selection before deleting anything:

```powershell
$OldDrivers | Format-Table Name, Architecture, FullName -AutoSize
```

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

## Preview the Removal

Run `Remove-Item` with `-WhatIf` to preview every folder that would be deleted:

```powershell
$OldDrivers.FullName | Remove-Item -Recurse -Force -WhatIf
```

Confirm that every displayed path is below the correct architecture folder and represents an obsolete version.

## Remove the Old Drivers

Remove the selected folders and confirm each deletion:

```powershell
$OldDrivers.FullName | Remove-Item -Recurse -Force -Confirm
```

The command deletes only the selected expanded folders. It does not remove the `winpedrivers-amd64` or `winpedrivers-arm64` roots.

{% hint style="info" %}
Downloaded package archives are stored separately below `C:\ProgramData\OSDeployCore\cache\downloads`. Removing an expanded driver folder does not remove its downloaded archive. When the current catalog still references that package, rerunning `Update-OSDeployCoreDrivers` can restore the expanded folder from the cached archive.
{% endhint %}

## Verify the Cleanup

List the remaining folders:

```powershell
Get-ChildItem -Path $DriverRoots.FullName -Directory -ErrorAction SilentlyContinue |
	Select-Object Name, Parent, FullName |
	Format-Table -AutoSize
```

Confirm that one current or known-working version remains for each required driver family. Run `Build-OSDeployBoot` and select only the required driver folders when creating the next boot image.

## Restore a Deleted Driver

Refresh a current driver source when a required folder was removed accidentally:

```powershell
Update-OSDeployCoreDrivers -Name 'dell'
```

Replace `dell` with `hp`, `intel-ethernet`, or `intel-wifi` as required. The command restores the version currently published in the OSDeploy driver catalog; it might not restore an older vendor release that is no longer published.

## Related

* [Update WinPE Drivers](/guide/cmdlets/update-osdeploycoredrivers.md)
* [Update-OSDeployCoreDrivers command reference](/command-reference/osdeploy/update-osdeploycoredrivers.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.osdeploy.com/osdeploy-insider/how-to/core-winpe-driver-cleanup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
