WBAdmin Delete Backups for Windows Server 2022/2019/2016

Learn how to use the “wbadmin delete backup” command to remove backups created by Windows Server Backup in Windows Server 2022/2019/2016/2012/2008 to save backup disk space.

By @Delia Last Updated September 27, 2024

Need to delete old Windows Server backups

According to Microsoft, Windows Server Backup (WSB) runs an automatic disk usage management to remove previous versions of backup to make room for the next backup. Seemingly, you don’t need to manually delete backups by running the “wbadmin delete backup” command because WSB is supposed to do it for you.

Nevertheless, you will still have a backup failure for the backup disk is full after running scheduled backups a couple of times. The truth is, you will meet Windows Server Backup not deleting old backups problem when WSB can no longer track the space allocated for snapshots.

As you know, backups created by WSB cannot be deleted in File Explorer. To free up more space for new backups, you can use the WBAdmin command to delete old backups from the Command Prompt.

AOMEI Backupper

If you want to delete Windows Server backups automatically, try the best server backup software.

Windows Server Backup delete old backups tutorial

There are two types of backups that WSB creates, system state backups and non-system state backups. You can use different command parameters to get rid of them. To delete backups using the WBAdmin command, you need to open an elevated Command Prompt first. You can right-click on Start and select Command Prompt (Admin).

一 Delete system state backup

A system state backup is kept in an independent directory. You may use different parameters after “wbadmin delete systemstatebackup” to specify the backups to be deleted:

  • [-version]: to delete specific version(s)

  • [-keepVersions]: to delete all backups but the specified versions

  • [-deleteOldest]: to delete the oldest backup

For example, to delete the system backup that was taken on May the fourth evening at 18:25, just run the following command in Command Prompt:

wbadmin delete systemstatebackup -version:05/04/2015-18:25 -backupTarget:G:

一 Delete non-system state backup

If your server is running Windows Server 2012/2012 R2 or Windows Server 2016, you can run the “wbadmin delete backup” command to remove backups as you wish. You can specify the backups you want to delete by using one, and only one, of the following parameters: [-version], [-keepVersions], or [-deleteOldest]

For example, to delete all backups except the latest three versions, run the command below:

wbadmin delete backup -keepVersions:3 -backupTarget:F: -machine:WIN-9814GD4FH95

✍ Tips: The parameter “-machine” is only needed when you have backed up many computers to the same location.

In Windows Server 2008 R2 or previous versions of Windows Server, WSB will not allow you to directly delete non-system state backups. As a workaround, you can delete the corresponding shadow copy on the backup target location. To delete the shadow copy, you can follow the steps below:

1. Type diskshadow in an elevated Command Prompt and press Enter.

2. Type the command delete shadows oldest G: and press Enter. The parameter “G” has to be replaced with your backup drive letter or volume GUID.

Generally, the backup drive has no drive letter. In that case, to use WBAdmin to delete full volume backup, you may need to manually assign a drive letter to the backup drive or run the command “Mountvol” to learn the volume GUID.

As a backup program, WSB works in some ways, but it still has a long way to go. Instead of worrying that the scheduled backup will fail someday, you can switch to more dedicated backup software which can let Windows Server Backup remove old backups automatically.

Auto-delete Windows Server backups with effective backup software

To delete Windows Server backups automatically, the best server backup software - AOMEI Backupper Server comes to help.

AOMEI Backupper
Easiest Server Backup Software
  • Multiple backup types: It offers System Backup, Disk Backup, Partition Backup, File Backup, Email Backup and so on to meet your different needs.

  • Scheduled backup tasks: Unlike WSB, it allows you to have as many scheduled backup tasks as you like followed by full/incremental/differential backups.

  • Old backup deletion: You can choose different cleanup rules based on your need, including By quantity, By time, By daily/weekly/monthly and By space.

  • Email notification: You can set an email notification to inform you if your backup is finished or failed.

Seeing its intuitive interface, you will be pleased to use it for your backup tasks. Follow the guidance below to backup Windows Server with AOMEI Backupper:

1. Download, install, and launch this server backup program. Under the Backup tab, choose one of the backup types. Here I choose System Backup.

2. The program will include system-related partitions in the backup automatically. Click to specify a destination path to save the backup image.

3. Click on Schedule Backup to create a scheduled backup.

Then click on Backup Scheme to enable Automatic Backup Cleanup.

4. Click Start Backup and choose “Add the schedule and start backup now” or “Only add the schedule” to run the backup immediately or just add the backup schedule.

More about WBAdmin backup and restore command

In this part, you’ll learn some commonly used WBAdmin backup and restore commands:

🚩 One-time/scheduled backup & recovery

wbadmin start backup: Runs a one-time backup. If used with no parameters, uses the settings from the daily backup schedule.

wbadmin enable backup: Configures and enables a regularly scheduled backup.

wbadmin start recovery: Runs a recovery of the volumes, applications, files, or folders specified.

wbadmin start sysrecovery: Runs a recovery of the full system (at least all the volumes that contain the operating system's state). This command is only available if you are using the Windows Recovery Environment.

🚩 System state backup & recovery

wbadmin start systemstatebackup: Runs a system state backup.

wbadmin start systemstaterecovery: Runs a system state recovery.

🚩 Other useful commands

wbadmin disable backup: Disables your daily backups.

wbadmin get versions: Lists details of backups recoverable from the local computer or, if another location is specified, from another computer.

Conclusion

That’s all for how to use WBAdmin to delete backups. If you want to avoid the issue of Windows Server Backup not deleting old backups, just try AOMEI Backupper.

With AOMEI Backupper, you don’t ever need to use the “wbadmin delete backup” command to delete old backups, or even care to delete backups yourself because it will automatically do it in your desired way. 

If your server crashes, you can use the backup created by AOMEI Backupper to recover your server or restore to dissimilar hardware server with bootable rescue media or AOMEI PXE Boot Tool. Go for it right now!