Windows includes a Group Policy setting that automatically deletes the user profile folders that are older than a specified number of days. This article applies to Pro and higher editions of Windows that have the Group Policy Editor.
Delete Old User Profile Folders Automatically in Windows
To automatically delete old user profiles that have not been used for a certain number of days, follow these steps:
- Launch the Group Policy Editor (
- Go to the following section:
Computer Configuration → Administrative Templates → System → User Profiles
- Double-click Delete user profiles older than a specified number of days on system restart
- Select Enabled, Specify the number of days and click OK.
This policy setting allows an administrator to automatically delete user profiles on system restart that have not been used within a specified number of days. Note: One day is interpreted as 24 hours after a specific user profile was accessed.
If you enable this policy setting, the User Profile Service will automatically delete on the next system restart all user profiles on the computer that have not been used within the specified number of days.
Using DelProf2 to delete old user profiles
Another option would be to use a third-party utility named DelProf2. Delprof2 is the unofficial successor to Microsoft’s Delprof which does not work with operating systems newer than Windows XP. If you’re using Windows 7 or Windows 8/8.1, use DelProf2 to delete old user profile folders.
Delprof2 has issues with UWP apps on Windows 10. Why? Windows 10 stores per-user settings in per-machine database files that are exclusively locked (almost?) all of the time.
Delprof2 deletes inactive user profiles. If you want to reclaim disk space just run it without parameters and it will delete all profiles except your own and some special profiles needed by the operating system (like “Default”).
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!