How to Cleanup Older File History Backups in Windows 10

File History does point in time backups of your files so that you can revert back to the exact copy or version of your files when you need them. Although File History allows you to configure how long the backups are retained, however, it doesn’t seem to clear the older versions of the files automatically.

File History doesn’t automatically clear older versions of the files despite choosing an option in the Keep saved versions: dropdown. You can see that in the following screenshot.

file history does not clean older versions automatically

I have configured File History to retain the versions stored within the last one month. However, the File History store shows much older versions of files are intact. The automatic cleanup is not working, and we don’t know if it’s by design or not. Or is it possible that the older versions are purged automatically when the hard disk becomes full? We’re not sure. Windows doesn’t seem to have a task that triggers the cleanup the older File History versions.

This post tells you how to clean up older versions of your File History backups using two different ways: using the File History GUI or command-line. The command-line can also be automated using Task Scheduler.

How to Cleanup Older File History Backups in Windows 10

Follow any of these methods to clean up older versions of File History backups on your Windows 10 computer.

Method 1: Using File History Settings

  1. Click Start, type Control Panel, and click Control Panel from the search results.
  2. Set Control Panel to icons view, and click File History
  3. Click Advanced Settings in the Tasks pane.
    How to Cleanup Older File History Backups in Windows 10
  4. In this screen, you can configure the frequency of backups, and how long the backups are stored. To delete older versions from the File History backup, click Clean up versionsHow to Cleanup Older File History Backups in Windows 10
  5. Select one of the following options in the drop-down, and click Clean up.
    • All but the latest one
    • Older than 1 month
    • Older than 3 months
    • Older than 6 months
    • Older than 9 months
    • Older than 1 year (default)
    • Older than 2 years

    How to Cleanup Older File History Backups in Windows 10

Method 2: Using Command Prompt

To clear older versions of file history backups, there is also a command-line tool named fhmanagew.exe. FhManagew.exe deletes file versions that exceed a specified age from the currently assigned File History target device.

For instance, to delete all file history backup versions that are older than 45 days, open a Command Prompt window and type:

FhManagew.exe -cleanup 45

How to Cleanup Older File History Backups in Windows 10

file history clean up old versions

Note: If no files match the age criteria you specified (files older than 45 days), the following message would appear.

We didn’t find any versions of your files that were that old
Choose a shorter period of time and try again.

The command-line tool supports the -quiet parameter which suppresses output message(s) and the dialog shown above. To do the clean up silently, you’d use:

FhManagew.exe -cleanup 45 -quiet

That’s it! Backup copies older than 45 days are removed. The oldest backup dates back to May 29 now.

file history clean older versions - fhmanagew.exe

file history clean older versions - fhmanagew.exe
File History folder size (before cleanup)
file history clean older versions - fhmanagew.exe
File History folder size (after cleanup)

Additional Tips

In addition to the above -cleanup switch, FhManageW.exe supports the following switches which aren’t officially documented.

Run File History backup on demand, manually.

FhManageW -backupnow

Stop File History backup that’s currently running

FhManageW -stop

Open File History settings page:

FhManageW -autoplay

Checks (Error checking) the drive assigned as the File History backup drive:

FhManageW -checktarget

Using FhManageW with Task Scheduler

You can automatically clear older versions of File History backups using Task Scheduler.

  1. Open Task Scheduler, and click Create Task
  2. Assign a name and description for the task — e.g. Clear Old File History Backups
  3. Select the Triggers tab, and click New.
  4. In the Begin the task: On a Schedule will be the default selection.
  5. Select the frequency you want the task to run: Weekly, Daily, or Monthly. You may choose Weekly, and select the day(s) you want the task to run. Multiple choices are allowed.
  6. Click OK, select the Actions tab, and click New.
  7. In the Program/Script text box, type c:\windows\system32\fhmanagew.exe
  8. In the Add arguments: type -cleanup 45 -quiet
    (The above command-line clears file history versions older than 45 days.)
  9. Click Ok, and select the Settings tab.
  10. Enable Run task as soon as possible after a scheduled start is missed
    file history older versions cleanup fhmanagew scheduled task
  11. Click OK.

Hope the scheduled task method plugs the shortcoming of the File History tool and helps save disk space by regularly purging the older versions of your files.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

3 thoughts on “How to Cleanup Older File History Backups in Windows 10”

  1. Is there a way to retain just the 3 most recent versions of a file, regardless of when they were last saved? If I choose to delete files older than 3 months, and there is only one version of a file (and IT is older than 3 months), is that one version kept even though it is older than 3 months? Thanks.

  2. I backup files in appdata, because of some pop3 and local email accounts. The multiple copies of these large files consumes massive space. If I Manually delete those files from the file history folder, will there be any ill effects (other than not being able to restore the specific file from particular date)?


Leave a Comment