{"id":3449,"date":"2016-07-08T15:20:17","date_gmt":"2016-07-08T09:50:17","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=3449"},"modified":"2022-01-22T10:56:12","modified_gmt":"2022-01-22T05:26:12","slug":"delete-older-versions-files-file-history","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/delete-older-versions-files-file-history\/","title":{"rendered":"How to Cleanup Older File History Backups in Windows 10\/11"},"content":{"rendered":"<p>File History does point in time backups of your files so that you can revert to the exact copy or version of your files when you need them. In addition, file<a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-the-file-history-feature-in-windows-8-and-10\/\">\u00a0History<\/a> allows you to configure how long the backups are retained. However, it doesn&#8217;t seem to automatically clear the older versions of the files.<\/p>\n<p><!--more--><\/p>\n<p>File History doesn&#8217;t automatically clear older versions of the files despite choosing an option in the <strong>Keep saved versions:<\/strong> dropdown. You can see that in the following screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10313\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-not-cleaning-up.png\" alt=\"file history does not clean older versions automatically\" width=\"781\" height=\"458\" srcset=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-not-cleaning-up.png 781w, https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-not-cleaning-up-768x450.png 768w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/p>\n<p>I have configured File History to retain the versions stored within the last one month. However, the File History store shows that much older files are intact. The automatic cleanup is not working, and we don&#8217;t know if it&#8217;s by design or not. Or is it possible that the older versions are purged automatically when the hard disk becomes full? We&#8217;re not sure. Windows doesn&#8217;t seem to have a task that triggers the cleanup of the older File History versions.<\/p>\n<p>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.<\/p>\n<div id=\"toc\">\n<p><strong>Article Summary<\/strong><\/p>\n<ol>\n<li><a href=\"#filehistory_gui\">Clean up Older File History Backups via Settings<\/a><\/li>\n<li><a href=\"#filehistory_cli_fhmanagew_exe\">Clean up Older File History Backups via command-line (fhmanagew.exe)<\/a>\n<ul>\n<li><a href=\"#fhmanagew_task_scheduler\">Run File History cleanup as a Scheduled Task (optional)<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div>\n<h2>How to Cleanup Older File History Backups<\/h2>\n<p>Follow any of these methods to clean up older versions of File History backups on your Windows 10\/11 computer.<\/p>\n<h3><a id=\"filehistory_gui\"><\/a>Method 1: Using File History Settings<\/h3>\n<ol>\n<li>Click Start, type Control Panel.<\/li>\n<li>Click Control Panel from the search results.<\/li>\n<li>Set Control Panel to icons view, and click File History<\/li>\n<li>Click Advanced Settings in the Tasks pane.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3457\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-1.png\" alt=\"How to Cleanup Older File History Backups in Windows 10\" width=\"650\" height=\"285\" \/><\/li>\n<li>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 <b>Clean up versions.<\/b><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3456\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-2.png\" alt=\"How to Cleanup Older File History Backups in Windows 10\" width=\"650\" height=\"405\" \/><\/li>\n<li>Select one of the following options in the dropdown, and click <b>Clean up<\/b>.\n<ul>\n<li>All but the latest one<\/li>\n<li>Older than 1 month<\/li>\n<li>Older than 3 months<\/li>\n<li>Older than 6 months<\/li>\n<li>Older than 9 months<\/li>\n<li>Older than 1 year (default)<\/li>\n<li>Older than 2 years<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3455\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-3.png\" alt=\"How to Cleanup Older File History Backups in Windows 10\" width=\"650\" height=\"298\" \/><\/li>\n<\/ol>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/file-history-parameter-is-incorrect-error\/\">[Fix] File History &#8220;The parameter is incorrect&#8221; Error<\/a><\/div>\n<hr \/>\n<h3><a id=\"filehistory_cli_fhmanagew_exe\"><\/a>Method 2: Using Command Prompt<\/h3>\n<p>To clear older versions of file history backups, there is also a command-line tool named <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/hh829770(v=vs.85).aspx?f=255&amp;MSPPError=-2147217396\" target=\"_blank\" rel=\"noopener noreferrer\">fhmanagew.exe<\/a>. FhManagew.exe deletes file versions that exceed a specified age from the currently assigned File History target device.<\/p>\n<p>For instance, to delete all file history backup versions that are older than <code>45<\/code> days, open a Command Prompt window and type:<\/p>\n<pre>FhManagew.exe -cleanup 45<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3452\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-6.png\" alt=\"How to Cleanup Older File History Backups in Windows 10\" width=\"650\" height=\"148\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3454\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-4.png\" alt=\"file history clean up old versions\" width=\"650\" height=\"286\" \/><\/p>\n<p><b>Note:<\/b> If no files match the age criteria you specified (files older than <code>45<\/code> days), the following message would appear.<\/p>\n<div class=\"qt\">We didn&#8217;t find any versions of your files that were that old<br \/>\nChoose a shorter period of time and try again.<\/div>\n<p>The command-line tool supports the <code><strong>-quiet<\/strong><\/code> parameter which suppresses output message(s) and the dialog shown above. To do the clean up silently, you&#8217;d use:<\/p>\n<pre>FhManagew.exe -cleanup 45 -quiet<\/pre>\n<p><strong>That&#8217;s it! Backup copies older than 45 days are removed. The oldest backup dates back to May 29 now.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10314\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-after-clean-datediff.png\" alt=\"file history clean older versions - fhmanagew.exe\" width=\"700\" height=\"402\" \/><\/p>\n<figure id=\"attachment_10316\" aria-describedby=\"caption-attachment-10316\" style=\"width: 353px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10316 size-full\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-before-clean.png\" alt=\"file history clean older versions - fhmanagew.exe\" width=\"363\" height=\"481\" \/><figcaption id=\"caption-attachment-10316\" class=\"wp-caption-text\">File History folder size (before cleanup)<\/figcaption><\/figure>\n<figure id=\"attachment_10315\" aria-describedby=\"caption-attachment-10315\" style=\"width: 353px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10315 size-full\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-after-clean.png\" alt=\"file history clean older versions - fhmanagew.exe\" width=\"363\" height=\"481\" \/><figcaption id=\"caption-attachment-10315\" class=\"wp-caption-text\">File History folder size (after cleanup)<\/figcaption><\/figure>\n<div class=\"qt\">\n<h4>Additional Tips<\/h4>\n<p>In addition to the above <code>-cleanup<\/code> switch, FhManageW.exe supports the following switches, which aren&#8217;t officially documented.<\/p>\n<p>Run File History backup on demand, manually.<\/p>\n<pre>FhManageW -backupnow<\/pre>\n<p>Stop File History backup that&#8217;s currently running<\/p>\n<pre>FhManageW -stop<\/pre>\n<p>Open File History settings page:<\/p>\n<pre>FhManageW -autoplay<\/pre>\n<p>Checks (Error checking) the drive assigned as the File History backup drive:<\/p>\n<pre>FhManageW -checktarget<\/pre>\n<\/div>\n<h4><a id=\"fhmanagew_task_scheduler\"><\/a>Using FhManageW with Task Scheduler<\/h4>\n<p>You can automatically clear older versions of File History backups using Task Scheduler.<\/p>\n<ol>\n<li>Open Task Scheduler, and click Create Task.<\/li>\n<li>Assign a name and description for the task &#8212; e.g., Clear Old File History Backups<\/li>\n<li>Select the Triggers tab, and click New.<\/li>\n<li>In the Begin the task: <strong>On a Schedule<\/strong> will be the default selection.<\/li>\n<li>Select the frequency you want the task to run: Weekly, Daily, or Monthly. For example, you may choose Weekly, and select the day(s) you want the job to run. Multiple choices are allowed.<\/li>\n<li>Click OK, select the Actions tab, and click New.<\/li>\n<li>In the Program\/Script text box, type <code>c:\\windows\\system32\\fhmanagew.exe<\/code><\/li>\n<li>In the Add arguments: type <code>-cleanup 45 -quiet<\/code><br \/>\n<em>(The above command-line clears file history versions older than 45 days.)<\/em><\/li>\n<li>Click Ok, and select the Settings tab.<\/li>\n<li>Enable <strong>Run task as soon as possible after a scheduled start is missed<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10317\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/07\/file-history-cleanup-scheduler.png\" alt=\"file history older versions cleanup fhmanagew scheduled task\" width=\"632\" height=\"480\" \/><\/strong><\/li>\n<li>Click OK.<\/li>\n<\/ol>\n<p>I 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>File History does point in time backups of your files so that you can revert to the exact copy or version of your files when you need them. In addition, file\u00a0History allows you to configure how long the backups are retained. However, it doesn&#8217;t seem to automatically clear the older versions of the files.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[872],"class_list":["post-3449","post","type-post","status-publish","format-standard","hentry","category-windows","tag-file-history"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":58669,"url":"https:\/\/www.winhelponline.com\/blog\/reset-file-history-to-defaults\/","url_meta":{"origin":3449,"position":0},"title":"How to Reset File History Back to Default Settings","author":"Ramesh","date":"July 6, 2023","format":false,"excerpt":"File History automatically backs up files in your libraries, contacts, favorites, and on your desktop. You can also find different versions of your files from a specific point in time. You can add and remove custom folder locations from the backup. The customizations are stored in the two XML files,\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"reset file history to defaults","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/file-history-reset.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/file-history-reset.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/file-history-reset.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1503,"url":"https:\/\/www.winhelponline.com\/blog\/how-to-use-the-file-history-feature-in-windows-8-and-10\/","url_meta":{"origin":3449,"position":1},"title":"How to Use the File History Feature in Windows 8 and 10","author":"Ramesh","date":"January 27, 2016","format":false,"excerpt":"File History, included in Windows 8, 8.1 and Windows 10, is used to backup your personal files at chosen intervals and recover a specific version of the file you want from backup. To use File History you need to select an external drive or a network location where you want\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/w10-fhistory1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/w10-fhistory1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/w10-fhistory1.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4640,"url":"https:\/\/www.winhelponline.com\/blog\/automatically-clear-temp-files-every-login-using-disk-cleanup-batch-file\/","url_meta":{"origin":3449,"position":2},"title":"Automatically Clear Temp Files Using Disk Cleanup, Storage Sense or Batch file","author":"Ramesh","date":"November 22, 2016","format":false,"excerpt":"The TEMP directory (%temp%) gets bloated over time as applications store data over there and don't always remove the files and folders they created. And, software installers extract the contents of the setup packages to the %temp% folder and fail to do the cleanup act when the installation is complete.\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"windows 10 storage settings cleanup options","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/storage-settings-cleanup-options.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/storage-settings-cleanup-options.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/storage-settings-cleanup-options.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5156,"url":"https:\/\/www.winhelponline.com\/blog\/disk-cleanup-3-99-tb-bug-windows-update-cleanup\/","url_meta":{"origin":3449,"position":3},"title":"Disk Cleanup Bug : 3.99 TB Used by Windows Updates [Fixed]","author":"Ramesh","date":"January 15, 2017","format":false,"excerpt":"After installing a Cumulative Update, when you run Disk Cleanup (cleanmgr.exe) as administrator to cleanup system files, it may incorrectly show 3.99 TB as being occupied by older versions of Windows Updates. This incorrect reporting happens because Disk Cleanup miscalculates the size of WinSxs folder, not taking the hard links\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"kb3194798 3.99 tb disk cleanup","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/wu-cleanup-399tb-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":25848,"url":"https:\/\/www.winhelponline.com\/blog\/file-history-parameter-is-incorrect-error\/","url_meta":{"origin":3449,"position":4},"title":"[Fix] File History &#8220;The parameter is incorrect&#8221; Error","author":"Ramesh","date":"January 21, 2022","format":false,"excerpt":"File History may have been working all these years correctly. But, of late, you may have noticed that File History backups stopped working even though the File History settings page says the feature is turned on. To make it work again, users may attempt to clean up old versions of\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"file history not working - element not found error","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/01\/rename-file-history-xml.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/01\/rename-file-history-xml.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/01\/rename-file-history-xml.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":9898,"url":"https:\/\/www.winhelponline.com\/blog\/automatically-backup-registry-hives-windows-10\/","url_meta":{"origin":3449,"position":5},"title":"How to Automatically Backup the Entire Registry in Windows","author":"Ramesh","date":"June 22, 2019","format":false,"excerpt":"Every System Restore point or shadow copy maintains a complete backup of the registry hives. However, Windows 10\/11 doesn't automatically create System Restore points every day. Restore Points are created only when installing important updates or drivers. Notwithstanding the System Restore's excellent capabilities, relying upon System Restore as a file\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"backup registry daily or weekly - regidlebackup task","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/06\/registry-backup-task-regidlebackup.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/06\/registry-backup-task-regidlebackup.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/06\/registry-backup-task-regidlebackup.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/3449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=3449"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/3449\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=3449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=3449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=3449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}