In this guide, you’ll learn how you can automatically delete old user profiles using Intune on Windows devices. Using an Intune policy, you can target devices and auto-remove old or unused profiles that haven’t been used for a specified number of days.
A Windows user profile consists of files, folders, and settings that define a user’s environment on a computer. When a user logs on to a computer, the system creates a user profile for them. When multiple users log in to the same computer, profiles are created for every user.
Managing user profiles on Windows devices can be challenging, especially when those profiles are old or outdated. It could be challenging for administrators to tell if a user profile is being used or not. It becomes absolutely important to delete these unused Windows user profiles when they start to occupy a large amount of disk space on a computer.
Thankfully, Microsoft Intune lets you automatically clean up all stale local user profiles on remote computers that have not been used within the specified number of days. In an Active Directory environment, you can use the Group Policy for removing these unused profiles.

Why Remove Old Windows User Profiles?
Before we proceed further, if you’re looking for some valid reasons for removing the local old Windows user profiles on the devices, here are some of them:
- Security risks: Keeping the old unused profiles can pose a security risk. You never know what data is stored in the user profiles.
- Performance issues: Deleting old user profiles helps keep the device running smoothly and organized.
- Disk Space: User profiles may take up to GBs of disk space. Automated removal of these unwanted profiles can save a lot of disk space.
Automatically Delete Old User Profiles using Intune
Let’s create an Intune policy to automatically remove all the old Windows user profiles. Sign in to the Intune admin center and go to Devices > Windows > Manage Devices > Configuration. Under Policies, click Create > New Policy. Choose Windows 10 and later as the platform and Settings Catalog as the profile type. Click Create.

On the Basics tab, enter the name of the profile and provide a policy description. The following details are specified in the below screenshot:
- Name: Automatically delete old user profiles
- Description: Auto-remove old or unused profiles that haven’t been used for a specified number of days.
Click Next.

In the Configuration Settings section, under Settings Catalog, click Add Settings. In the Settings picker window, type “delete user profiles older than” in the search box and click Search.
From the search results, select the category Administrative Templates\System\User Profiles. In the bottom pane, select the setting “Delete user profiles older than a specified number of days on system restart.” When you enable this setting, the additional setting “delete user profiles older than (days) (Device) is also selected”. Close the settings picker window.

To activate the setting “Delete user profiles older than a specified number of days on system restart,” toggle the switch to Enabled.
Next, specify the number of days after which the user profiles should be deleted automatically on system restart. For example, if you specify 60 days, the policy will remove all the stale Windows user profiles that haven’t been used for 60 days.
What’s the ideal number of days for automatic profile deletion? Since it varies for every organization, there is no set value for the number of days selected to clear up the old profiles. For the automated cleanup of Windows user profiles, some businesses use 30 days or even 120 days. Deleting user profiles from a device does not delete a user or their information in Intune.

In the scope tags section, you specify scope tags. Specifying scope tags is optional, and you may skip this step. Click Next.
In the Assignments window, select the user groups to which you want to assign this policy. We recommend deploying the profile to a few test user groups first and then expanding it to more users if the testing is successful. Select Next.

On the Review + Create page, review all the settings that you have configured for hiding the try new Outlook toggle via Intune and select Create.

After you create the above configuration policy in Intune, a notification appears: “Policy created successfully.” This confirms that the policy has been created and is being applied to the groups we chose. The profile we created can be found in the configuration profiles section of the admin center.
Sync your devices with Intune
If you’re testing this policy on a set of pilot devices to confirm its working, you can manually sync the policies on these devices with Intune. This will speed up things and ensure the devices will immediately obtain the latest policies, configurations, and updates from Intune.
End-User Experience
Let’s verify that old profiles are being deleted by the Intune policy as expected. The user profiles are located in the C:\Users folder on your Windows system drive. Once the policy settings are applied to the devices you’ve selected, 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 60 days.
Still Need Help?
If you need further assistance on the above article or want to discuss other technical issues, check out some of these options.