If you are a network admin you are probably facing this task quite often. People come and go, and that leaves some obsolete user profiles untouched on the desktop. Sometimes, the list of inactive user profiles on some computers can get grown pretty long if turnovers are quite high. It would be nice if they can be cleaned up regularly to keep the desktop clean and free some spaces too.
Here are 3 ways that you can do.
The tool out of the box
Normally, if I want to clean up old user profiles on a local system, I will just use the native tool. Open System Properties, switch to Advanced tab, and click Settings button in User Profiles section.
Then select the user profile that needs to be cleaned and click Delete.
As you can see, it’s tedious and not very efficient at all. It takes me a few clicks to get there, and only allows me to delete one at the time. It’s easy when there are only a few of old profiles to deal with on a local system. but it becomes impossible if you want to do the clean-up on a remote computer.
DelProf2
And that’s why I like this tool called Delprof2 so much.
Delprof2 is the unofficial successor to Microsoft’s official Delprof which only works up until Windows XP. It’s a completely free command line tool that can easily delete inactive user profiles both locally and remotely. It also has some additional filtering options that can help you delete the local copy of a roaming profile or any of those profiles that are inactive.
See our full review of Delprof2 for more details.
Group Policy
There is also a Group Policy setting that can automate this process. Check this post we shared this trick a long time ago.
Open Group Policy Editor, navigator to
Local Computer Policy → Computer Configuration → Administrative Templates → System → User Profile
Double-click the setting called “Delete user profiles older than a specified number of days on system restart“, Enable the option, and pick a day from the list. OK to apply the change.
Once the setting is enabled and is in place. All old user profiles that are older than the days specified in the group policy setting will be automatically deleted on system restart.
Yeah, you don’t know what you’re talking about. Option 3 leaves C:\User\ folders, which is apparently a known and unresolved issue since 2012.
Hi,
The “Delete user profiles older than a specified number of days on system restart“ seems doing the job but it leaves the empty folder in “C:\Users\”. Is there a way to automatically get rid of it. The sad part, sometimes it works on reboot and sometimes it does not.
In Group policy editor, can we have exceptions. Like Default and Public