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 after a specific user profile was accessed. You may need to do this if you are working in an environment where there are many users who come, create a user profile, use the system for a while and go away – like say an academic institution or a workplace – and you don’t want unused user-profiles clogging your system.

Delete user profiles older than a specified number of days on system restart

To configure this setting, type gpedit.msc in start search and hit Enter to open the Group Policy Editor. Next navigate to: Computer Configuration > Administrative Templates > System > User Profiles. Now in the right-hand side details pane, double-click on Delete user profiles older than a specified number of days on system restart to open its configuration box. 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. If you disable or do not configure this policy setting, User Profile Service will not automatically delete any profiles on the next system restart. Select Enabled and then set the number of days. After 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. If you disable or do not configure this policy setting, User Profile Service will not automatically delete any profiles on the next system restart. Hope this helps.

Delete old user profiles and files automatically in Windows 11 10 - 59Delete old user profiles and files automatically in Windows 11 10 - 10