Share via

Delete User Profiles Older Than 30 Days

Santhosh B S 106 Reputation points
2026-03-24T11:31:53.4866667+00:00

Team,Multiple user profiles older than 30 days are present on the device. For these inactive profiles, the corresponding registry State DWORD under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList is set to 4, indicating the profiles are not currently loaded. The active user profile has a State value of 0. Based on this behavior, it is safe to delete the inactive user profiles along with their associated registry entries.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Harry Phan 17,200 Reputation points Independent Advisor
    2026-03-24T12:15:40.3633333+00:00

    Hi Santhos~ Yes, your assessment is correct. A State value of 4 under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList indicates the profile is not currently loaded and is safe to remove, provided it has not been used in over 30 days and is not tied to any active service accounts. The proper way to clean these up is to first delete the profile directory under C:\Users\<username> and then remove the corresponding SID key from ProfileList. Always confirm the active profile has a State value of 0 and do not touch that entry. Before deletion, it’s best practice to export the registry key for backup and ensure no scheduled tasks or services are referencing those accounts. Once removed, Windows will rebuild the profile if the user logs in again, so there’s no risk of breaking the system if you only target inactive accounts.

    I hope you found something useful here. If this helps resolving your issue, please accept the answer to let me know it's cleared.

    Harry.


  2. Q&A Assist
    2026-03-24T11:32:27.94+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The assumption is not fully correct. A State value of 4 in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList indicates that the profile is not currently loaded, but this alone is not a documented guarantee that the profile is safe to delete manually.

    For automated and supported cleanup of inactive profiles, the recommended approach is to use the Delete user profiles older than a specified number of days on system restart policy (or its MDM/Policy CSP equivalent CleanupProfiles). This policy is implemented by the User Profile Service and only deletes profiles that are not loaded at restart and that have not been used within the configured age threshold.

    Key points from the documented behavior:

    1. The CleanupProfiles policy (ADMX-backed, mapped to Delete user profiles older than a specified number of days on system restart) is the supported way to automatically delete unused profiles on restart.
    2. The User Profile Service will delete only profiles that are not in use when the system restarts and that meet the “not used within N days” condition.
    3. Scripts provided in the documentation are designed to:
      • Determine which profiles would be considered “aged” by this policy.
      • Optionally delete those aged profiles, but only when they are not loaded.

    Therefore, instead of relying solely on the State = 4 registry value as a safety indicator, use one of these supported methods:

    1. Configure the Delete user profiles older than a specified number of days on system restart Group Policy (or the CleanupProfiles MDM policy) with the desired age (for example, 30 days). Let the User Profile Service handle deletion on restart.
    2. Use the documented scripts to:
      • Enumerate profile ages.
      • Confirm which profiles meet the age criteria.
      • Optionally delete only those profiles that are not loaded.

    This aligns profile deletion with the documented policy behavior and avoids relying on undocumented interpretations of the State value alone.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.