How to delete a user profile in Windows 11 and 10 (properly)

Laptop on a desk next to a window

Quick answer: To remove someone completely, sign in as an administrator, go to Settings > Accounts > Other users, open the account and select Remove next to Account and data. To delete only the profile and keep the account (for example to fix a corrupted profile), press Win + R, run sysdm.cpl, open the Advanced tab, click Settings under User Profiles, pick the profile and click Delete. Don’t just delete the folder in C:\Users; that leaves a registry entry behind and can cause temporary profile errors.

Laptop on a desk next to a window

Account or profile: which do you want to delete?

Windows keeps these apart. The account is what someone signs in with. The profile is everything Windows stores for that account on this PC: the C:\Users\name folder with Desktop, Documents, Downloads and AppData, plus the user’s own registry settings. Pick the method by what you want to end up with:

GoalMethodWhat’s left afterwards
Remove a person from this PCSettings: Remove account and dataNothing on this PC. A Microsoft account itself still exists online
Fix a corrupted profile but keep the userUser Profiles dialog: DeleteThe account. Windows builds a fresh profile at next sign-in
Clean up profiles on several PCs or by scriptPowerShell with Win32_UserProfileThe account, unless you remove it too
Remove a local account from the command lineDelete the profile first, then the accountNothing, if done in that order

Before you start

  • Back up the user’s files. Deleting a profile removes their Desktop, Documents, Downloads and app data from this PC. Copy anything they need to an external drive or check it’s in OneDrive first.
  • Use a different administrator account. You can’t delete the profile you’re signed in with, and Microsoft’s own cleanup scripts only touch profiles that aren’t loaded. If the user is signed in, sign them out or restart the PC first.
  • You need administrator rights. A standard account can’t delete other users.

Delete the account and its data in Settings

This is the right choice when someone no longer uses the PC. It works the same way in Windows 11 and Windows 10, according to Microsoft:

  1. Open Settings and select Accounts.
  2. Select Other users (on some Windows 10 versions this page is called Family & other users).
  3. Under Other users, expand the account you want to remove.
  4. Next to Account and data, select Remove. Confirm when asked; on current versions the button reads Delete account and data.

Microsoft notes that this doesn’t delete the person’s Microsoft account. It removes their sign-in and data from this device only, so they can still use the same account elsewhere. If you only wanted to rename the account instead, see how to change the user name in Windows.

Delete only the profile (keep the account)

Use this when an account misbehaves (Start menu or settings broken for one user only, or a profile that won’t load) and you want the user to start fresh with the same sign-in.

  1. Sign in with another administrator account.
  2. Press Win + R, type sysdm.cpl and press Enter. (SystemPropertiesAdvanced opens the same window on the right tab.)
  3. On the Advanced tab, under User Profiles, click Settings.
  4. Select the profile, check its size and name, and click Delete. Confirm when asked.

If Delete is greyed out, that profile is still loaded. Restart the PC and sign in only with your admin account, then try again. When the user next signs in, Windows creates a new profile, and you can copy their backed-up files back into it.

Delete a profile with PowerShell

Microsoft’s own profile cleanup scripts remove profiles through the Win32_UserProfile class, which also removes the matching registry entry. To do it for one profile, open PowerShell as administrator and first list what’s there:

Get-CimInstance -ClassName Win32_UserProfile | Where-Object { -not $_.Special } | Select-Object LocalPath, Loaded, LastUseTime

Check that the profile you want shows Loaded as False, then delete it by its folder path (change the name):

Get-CimInstance -ClassName Win32_UserProfile | Where-Object { $_.LocalPath -eq 'C:\Users\olduser' } | Remove-CimInstance

To remove a local account afterwards, run Remove-LocalUser -Name "olduser" in the same PowerShell window, or net user olduser /delete from an elevated Command Prompt. Microsoft documents both as deleting the account; neither page says it removes the profile folder, so delete the profile first. Run Remove-LocalUser in 64-bit PowerShell; Microsoft notes it isn’t available in 32-bit PowerShell on 64-bit Windows.

Why you shouldn’t just delete the folder

Each profile has an entry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, one key per user SID, whose ProfileImagePath points to the folder. Microsoft warns that if profiles are incompletely or improperly removed, extra user folders can be created or users may get TEMP profiles when they sign in. Deleting C:\Users\name in File Explorer does exactly that: the registry still expects a folder that’s gone.

If that has already happened and the user now gets a temporary profile:

  1. Sign in as a different administrator and export the ProfileList key in Registry Editor as a backup.
  2. Open each S-1-5-21-... key and find the one whose ProfileImagePath points to the deleted folder. A key ending in .bak is one Windows renamed after the profile failed to load.
  3. Delete that user’s key (and its .bak twin if there is one), restart, and have the user sign in again to get a new profile.

Leave keys for other users and the short system SIDs (S-1-5-18, -19, -20) alone.

Remove old profiles automatically

On shared or lab PCs, Windows Pro and higher can delete unused profiles for you. In Group Policy, go to Computer Configuration > Administrative Templates > System > User Profiles and enable Delete user profiles older than a specified number of days on system restart. Microsoft describes it as deleting profiles that haven’t been used within the number of days you set, counted from when each profile was last accessed. Profiles that are in use aren’t touched. Back up anything important first, because the policy doesn’t ask before deleting.

If you share the PC and just need to launch something as another user without signing out, run as a different user may be all you need.

Official sources:

How we write our guides: read our editorial policy.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *