How to Safely Remove Unused User Profiles in Windows Server 2019 to Free C: Drive Space — GUI and PowerShell Guide
Windows Server 2019 systems, particularly servers running Remote Desktop Services (RDS), can accumulate a large number of user profiles over time. Employees ...
Windows Server 2019 systems, particularly servers running Remote Desktop Services (RDS), can accumulate a large number of user profiles over time. Employees leave, temporary users stop using the server, test accounts are abandoned, and old RDP users may never log in again. Even though these accounts are no longer actively used, their local Windows profiles can continue consuming disk space.
On a server with many RDS users, cleaning genuinely unused profiles can recover a significant amount of space on the C: drive. However, deleting a Windows user profile must be done carefully because a profile contains much more than files visible on the desktop.
This article explains how to identify unused profiles, calculate their disk usage, distinguish between a user account and a user profile, safely remove profiles through the GUI or PowerShell, and avoid deleting profiles that are still required.
Does Removing an Unused User Profile Free Space on C:?
Yes.
By default, Windows Server 2019 normally stores local user profiles under:
C:\Users\Username
For an RDS server, every user who signs in can create a local profile unless the environment uses technologies such as roaming profiles, User Profile Disks (UPD), FSLogix profile containers, or another profile-management solution.
A user profile can contain:
- Desktop files
- Documents
- Downloads
- Pictures
- Favorites
- User-specific application data
- Chrome and Edge profiles
- Browser caches
- Microsoft Office caches and settings
- Outlook configuration and local data
- Temporary files
- Application caches
- Tally-related user settings
- Accounting/tax software configuration
- Printer settings
- Registry settings stored in
NTUSER.DAT %LOCALAPPDATA%%APPDATA%- Temporary application files
Consequently, one unused profile may occupy anywhere from a few hundred megabytes to several gigabytes.
For example, if 10 obsolete profiles average 3 GB each, removing them could theoretically recover approximately 30 GB of disk space.
Actual savings depend entirely on what each profile contains.
Important: User Account and User Profile Are Different
Before deleting anything, understand this distinction.
User Account
The account determines whether the person can authenticate to Windows.
Examples:
DOMAIN\User01
or:
SERVER\User01
Deleting a user account and deleting its profile are separate operations.
User Profile
The profile is the local collection of files, settings, registry data, caches, and application configuration Windows creates for the user.
It normally resides at:
C:\Users\User01
Therefore:
Deleting a user account does not necessarily clean up its old profile folder.
Similarly:
Deleting a profile does not necessarily delete the user's Active Directory or local account.
This distinction is especially important on RDS servers.
Why Profiles Become Large on an RDS Server
A heavily used Windows Server 2019 RDS environment can accumulate profile data quickly.
Suppose 20 users regularly use:
- Google Chrome
- Microsoft Edge
- Microsoft Word
- Microsoft Excel
- Adobe Acrobat Reader
- TallyPrime
- GST applications
- Accounting software
- WhatsApp Web
- Downloaded PDF and Excel files
Each user's profile may accumulate browser caches, temporary files, downloads, application data, Office caches, and other data.
Even an apparently inactive user may have a profile occupying several gigabytes.
This makes profile management an important part of RDS server maintenance.
Step 1: Check Available C: Drive Space
Before cleanup, record current disk usage.
Open PowerShell as Administrator:
Get-PSDrive C
For a clearer report:
Get-CimInstance Win32_LogicalDisk -Filter "DeviceID='C:'" |
Select-Object DeviceID,
@{Name="SizeGB";Expression={[math]::Round($_.Size/1GB,2)}},
@{Name="FreeGB";Expression={[math]::Round($_.FreeSpace/1GB,2)}}
Record the free-space value before deleting profiles so you can verify the actual space recovered afterward.
Step 2: Check Which User Profiles Exist
The simplest location is:
C:\Users
You may see folders such as:
Administrator
User01
User02
Accounts01
MAG01
Trainee01
Public
Default
Do not assume every folder that looks old can be deleted.
First determine whether the associated user is still required.
Step 3: List Profiles Using PowerShell
Open PowerShell as Administrator and run:
Get-CimInstance Win32_UserProfile |
Select-Object LocalPath, Loaded, Special, LastUseTime |
Sort-Object LastUseTime
This is much safer and more informative than relying only on folders under C:\Users.
Typical output may look like:
LocalPath Loaded Special LastUseTime
--------- ------ ------- -----------
C:\Users\UserOld False False ...
C:\Users\Accounts01 False False ...
C:\Users\Administrator True False ...
Loaded
True means the profile is currently loaded.
Do not delete a loaded profile.
Special
True generally identifies a Windows special/system profile.
Do not delete special profiles.
LastUseTime
This can help determine when the profile was last used.
However, do not use LastUseTime as the sole criterion for deletion. Confirm whether the account and its data are still required.
Step 4: Check Active RDS Sessions
Before deleting any RDS profile, check current sessions.
Run:
quser
or:
query user
You may see:
USERNAME SESSIONNAME ID STATE
Administrator rdp-tcp#2 1 Active
accounts01 rdp-tcp#5 7 Active
mag11 12 Disc
Pay attention to both:
Active
and:
Disc
A Disconnected RDS session is not necessarily logged off. Applications may still be running and the user's profile may still be loaded.
Do not remove that profile until the user has been properly logged off and the profile is no longer loaded.
Step 5: Find Large Profiles
Before deleting anything, identify which profiles are actually consuming significant space.
The following PowerShell script calculates approximate folder sizes:
$profiles = Get-ChildItem "C:\Users" -Directory
foreach ($profile in $profiles) {
$size = (
Get-ChildItem $profile.FullName -File -Recurse -Force -ErrorAction SilentlyContinue |
Measure-Object Length -Sum
).Sum
[PSCustomObject]@{
UserProfile = $profile.Name
SizeGB = [math]::Round($size / 1GB, 2)
}
} | Sort-Object SizeGB -Descending
On some PowerShell versions, piping directly after the foreach block can be problematic. This alternative is safer:
$results = foreach ($profile in Get-ChildItem "C:\Users" -Directory) {
$size = (
Get-ChildItem $profile.FullName -File -Recurse -Force -ErrorAction SilentlyContinue |
Measure-Object Length -Sum
).Sum
[PSCustomObject]@{
UserProfile = $profile.Name
SizeGB = [math]::Round($size / 1GB, 2)
}
}
$results | Sort-Object SizeGB -Descending
Be aware that scanning many large RDS profiles can generate considerable disk I/O. Run the scan during a quieter period if possible.
Step 6: Identify Profiles That Are Candidates for Removal
A profile should be considered for deletion only after confirming that:
- The user no longer requires the profile.
- The user is not logged in.
- No disconnected RDS session remains.
- The profile is not loaded.
- Required Desktop/Documents/Downloads data has been backed up or migrated.
- Application-specific settings are no longer required.
- The profile is not a Windows special profile.
- The environment is not relying on that local profile for required application configuration.
For an RDS server, a practical candidate might be an employee who left the organization months ago and whose data has already been backed up.
Method 1: Delete User Profile Through Windows GUI
This is one of the preferred methods when deleting individual profiles manually.
Open:
Control Panel → System
Then:
Advanced system settings
Under User Profiles, click:
Settings
You will see profiles stored on the computer.
Select the profile that is no longer required and click:
Delete
Confirm the deletion.
Windows then removes the registered local profile rather than merely deleting a visible folder.
Why You Should Not Simply Delete C:\Users\Username
A common approach is:
- Open
C:\Users - Right-click the user's folder
- Click Delete
This is not the preferred profile-removal method.
Windows maintains information about user profiles separately from the folder itself. Simply deleting the directory can leave Windows profile registration behind.
This may result in problems when the same user signs in again, including:
- Temporary profile
- Profile creation problems
- Duplicate profile folders
- Login errors
- Incorrect registry references
Use Windows profile-management mechanisms whenever possible.
Method 2: Delete a User Profile Using PowerShell
First inspect the target profile:
Get-CimInstance Win32_UserProfile |
Where-Object {$_.LocalPath -eq "C:\Users\UserOld"} |
Select-Object LocalPath, Loaded, Special, LastUseTime
Confirm:
Loaded = False
Special = False
Then remove the profile:
Get-CimInstance Win32_UserProfile |
Where-Object {
$_.LocalPath -eq "C:\Users\UserOld" -and
$_.Loaded -eq $false -and
$_.Special -eq $false
} |
Remove-CimInstance
Replace:
C:\Users\UserOld
with the actual profile path.
This approach tells Windows to remove the registered profile.
Safer PowerShell Workflow
Instead of immediately deleting anything, first create a report:
Get-CimInstance Win32_UserProfile |
Where-Object {
$_.Special -eq $false
} |
Select-Object LocalPath, Loaded, LastUseTime |
Sort-Object LastUseTime |
Format-Table -AutoSize
Review the results manually.
Only after confirming the profile is genuinely obsolete should it be removed.
Never Automatically Delete Profiles Based Only on Age
It may be tempting to write a command that deletes every profile not used for 30, 60, or 90 days.
On a production RDS server, automatic deletion based solely on age can be risky.
For example, an accountant may use a particular account only during:
- GST filing
- Audit periods
- Year-end closing
- Income tax filing
- Specific monthly activities
The profile may appear unused for months but still be required.
Use age as an identification criterion, not necessarily as automatic authorization to delete.
Profiles You Should Be Extremely Careful With
Do not indiscriminately remove profiles such as:
Administrator
Default
Public
Default User
systemprofile
LocalService
NetworkService
Also protect:
- Current administrators
- Service accounts
- Backup accounts
- Application service identities
- Accounts used by scheduled tasks
- Current RDS users
- Profiles belonging to active employees
If you do not know what a profile is, investigate it before removing it.
What Happens If the User Logs In Again?
Suppose you delete the local profile of:
DOMAIN\User01
but the Active Directory account remains enabled.
When User01 signs in again, Windows will generally create a new local profile for the account.
The user's previous local settings and files will not automatically return.
The new profile may have:
- Fresh Desktop
- Fresh AppData
- Fresh application preferences
- New browser configuration
- New Office preferences
This is why deleting a profile should not be treated merely as deleting cache.
Check Desktop, Documents and Downloads Before Deletion
Before deleting an old profile, inspect at least:
C:\Users\Username\Desktop
C:\Users\Username\Documents
C:\Users\Username\Downloads
Also consider:
C:\Users\Username\AppData\Roaming
C:\Users\Username\AppData\Local
AppData can contain application settings and application-specific files.
Do not delete it blindly if the user's software configuration may be needed.
Browser Data Can Consume Significant Space
On RDS servers, browsers are frequently responsible for considerable profile growth.
Check:
C:\Users\Username\AppData\Local\Google\Chrome
and:
C:\Users\Username\AppData\Local\Microsoft\Edge
Chrome and Edge may store:
- Cache
- Browser profiles
- Cookies
- Extensions
- Service-worker data
- IndexedDB databases
- GPU cache
- Website storage
- Session information
For active users, cleaning safe cache components may be preferable to deleting the entire Windows profile.
Outlook Profiles Require Additional Care
If Microsoft Outlook is used, check whether the profile contains OST or PST files.
Common locations include:
C:\Users\Username\AppData\Local\Microsoft\Outlook
and:
C:\Users\Username\Documents\Outlook Files
An OST file is normally a local synchronized copy and may often be recreated from the mail server.
A PST file, however, can contain locally stored email that may not exist elsewhere.
Never assume PST data can be recreated.
Back it up if required before deleting the Windows profile.
TallyPrime and Accounting Applications
On business RDS servers, users may run TallyPrime and other accounting/tax applications.
Before deleting profiles, determine whether critical business data is stored centrally or inside user-specific folders.
If company data resides in a shared location such as:
D:\TallyData
deleting a Windows profile should not delete that shared company data.
However, user-specific application settings, exports, downloaded files, local configurations, and temporary data may exist under the user's profile.
Always verify the actual environment first.
Local User Profiles
The same principle applies to local Windows accounts.
To view local users:
Get-LocalUser
You may see:
Administrator
Guest
OldUser
Support
Accounts
Before deleting an old local account, determine whether its profile contains required data.
If the account is obsolete but its files are important, copy or back up the required files before removing the profile.
Domain/RDS Profiles
On a domain-joined RDS server, profiles may belong to users such as:
DOMAIN\User01
DOMAIN\User02
DOMAIN\Accounts01
The local server stores their profiles even though their user accounts are maintained in Active Directory.
Deleting the local profile does not mean the Active Directory account has been deleted.
If the user logs back in, Windows may generate a fresh profile.
Orphaned Profiles
An orphaned profile can remain after:
- A user account was deleted
- An employee left
- An Active Directory account was removed
- A domain was changed
- A server was migrated
- A temporary account was abandoned
You can inspect profile SID information using:
Get-CimInstance Win32_UserProfile |
Select-Object LocalPath, SID, Loaded, Special, LastUseTime
A profile whose account no longer exists may appear with only an SID or may be difficult to associate with a current user.
Such profiles are potential cleanup candidates, but their data should still be checked before deletion.
Check ProfileList in Registry
Windows stores local profile references under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Each profile is associated with a SID.
You can inspect it through:
regedit
However, manual deletion from ProfileList should generally be reserved for troubleshooting damaged/orphaned profile registrations.
For routine profile removal, use the GUI or CIM/PowerShell profile-removal method.
Recommended Cleanup Strategy for a Production RDS Server
For a Windows Server 2019 RDS system, use a controlled process.
Phase 1 — Inventory
Generate a list of:
- Profile path
- SID
- Last-use information
- Loaded status
- Approximate profile size
Phase 2 — Classify
Classify profiles as:
Active
User still works on the server.
Inactive but required
User logs in infrequently or profile must be retained.
Former user
Account/user no longer requires server access.
Orphaned
Associated account no longer exists.
Unknown
Requires investigation.
Phase 3 — Backup
For deletion candidates, verify:
- Desktop
- Documents
- Downloads
- PST files
- Application data
- Business exports
- Local databases
- Any manually stored data
Phase 4 — Verify Session
Run:
quser
Confirm the target user has no active or disconnected session.
Also verify:
Get-CimInstance Win32_UserProfile |
Where-Object {$_.LocalPath -eq "C:\Users\UserOld"} |
Select LocalPath,Loaded,Special
Phase 5 — Remove
Delete the profile through:
System Properties → Advanced → User Profiles → Settings
or PowerShell/CIM.
Phase 6 — Verify Space
Run:
Get-CimInstance Win32_LogicalDisk -Filter "DeviceID='C:'" |
Select-Object DeviceID,
@{N="FreeGB";E={[math]::Round($_.FreeSpace/1GB,2)}}
Compare this against the pre-cleanup value.
Should We Delete Profiles Just to Improve Server Performance?
Profile deletion is primarily a storage-management operation.
If old profiles consume 50 GB, deleting them can recover close to that amount of disk space.
However, deleting inactive profiles does not directly give you more RAM or CPU cores.
It can indirectly help server operation if the system drive was critically low on free space.
Windows requires sufficient free disk space for:
- Page file
- Windows Update
- Temporary files
- Application temporary storage
- Logs
- Crash dumps
- Installer operations
- Servicing operations
Therefore, keeping C: from becoming critically full is important for overall server reliability.
Profile Cleanup vs Cache Cleanup
These are different maintenance tasks.
Profile deletion removes the user's entire local Windows environment.
Cache cleanup removes selected temporary/unnecessary data while preserving the profile.
For an active RDS user, cache cleanup is generally the more appropriate option.
For a former employee whose profile is no longer needed, full profile removal may be appropriate.
PowerShell Profile Audit Report
The following command provides a useful starting point:
Get-CimInstance Win32_UserProfile |
Where-Object {$_.Special -eq $false} |
Select-Object LocalPath,
SID,
Loaded,
LastUseTime |
Sort-Object LastUseTime |
Format-Table -AutoSize
For a production environment, consider exporting the inventory before cleanup:
Get-CimInstance Win32_UserProfile |
Where-Object {$_.Special -eq $false} |
Select-Object LocalPath,SID,Loaded,LastUseTime |
Export-Csv "C:\UserProfileAudit.csv" -NoTypeInformation
This creates:
C:\UserProfileAudit.csv
You can review the report before performing any deletions.
Recommended Best Practices
- Never delete a profile while the user is logged in.
- Check disconnected RDS sessions too.
- Never delete profiles purely because they appear old.
- Back up important user files first.
- Pay special attention to PST files.
- Confirm business applications do not store important data inside the profile.
- Avoid deleting system/special profiles.
- Prefer Windows profile-removal mechanisms over manually deleting folders.
- Maintain an audit report before and after cleanup.
- Measure C: free space before and after maintenance.
- Perform major cleanup during a maintenance window.
- Maintain a current backup of important server data.
Conclusion
Yes, removing genuinely unused Windows Server 2019 user profiles can recover significant space on the C: drive, especially on Remote Desktop Session Host servers that have accumulated profiles over several years.
The safest approach is not to simply delete folders from C:\Users.
Instead:
Inventory → Check Size → Verify User → Check RDS Session → Back Up Required Data → Remove Profile → Verify Free Space
For active users whose profiles are large, investigate browser caches, temporary files, Downloads, Office/Outlook data, and application caches before considering full profile deletion.
A well-managed RDS server should periodically audit old profiles so obsolete data does not continue consuming system-drive capacity indefinitely.
Frequently Asked Questions — FAQ
1. Does deleting a user profile free C: drive space?
Yes. If the profile is stored under C:\Users, removing it normally frees the disk space occupied by its local files.
2. How much space can one profile consume?
It varies considerably. A profile can consume hundreds of MB or many GB depending on browser data, downloads, Office files, Outlook data, application caches, and user-created files.
3. Is deleting a user account the same as deleting the profile?
No. A Windows/AD user account and its local Windows profile are separate objects.
4. Can I delete the folder directly from C:\Users?
It is not recommended as the normal removal procedure. Use Windows User Profiles settings or the supported profile-management interface through PowerShell.
5. Can I delete an RDS user's profile?
Yes, if the profile is genuinely no longer required and the user is fully logged off.
6. Can I delete a disconnected RDP user's profile?
Do not do so while the session remains disconnected but logged on. Log the user off first and confirm the profile is no longer loaded.
7. What happens if the user logs in again?
If the account still exists and profile creation succeeds, Windows will normally create a fresh local profile.
8. Will deleting a profile delete Tally company data?
Not if the company data is stored independently in a shared/central location. However, verify the actual Tally data path and any user-specific exports/settings before deleting anything.
9. Can Outlook data be lost?
Potentially. PST files can contain important local mail. Check for PST/OST files and understand the mail configuration before deleting the profile.
10. Should Administrator be deleted?
No. Do not remove the active server Administrator profile as routine cleanup.
11. Can I delete the Public profile?
No. C:\Users\Public is a Windows shared profile directory and should not be treated as an obsolete user's profile.
12. Can old domain-user profiles remain after the account is deleted?
Yes. Local profile data can remain on the RDS server after the corresponding Active Directory account is removed.
13. Does deleting profiles reduce RAM usage?
Not directly. Removing an inactive profile primarily recovers disk space. It does not add physical RAM.
14. Can low C: space affect server performance?
Yes. Critically low system-drive space can interfere with temporary storage, page-file operations, updates, application processes, logging, and Windows servicing.
15. Should profiles be deleted automatically after 30 days?
Not necessarily. On accounting and business servers, some legitimate users may log in only periodically. Review candidates before deletion.
16. Can PowerShell remove profiles?
Yes. Win32_UserProfile can be queried with CIM and an appropriate profile can be removed with Remove-CimInstance.
17. How do I know whether a profile is currently loaded?
Run:
Get-CimInstance Win32_UserProfile |
Select LocalPath,Loaded
A value of True indicates that the profile is loaded.
18. How can I check current RDS users?
Run:
quser
This displays active and disconnected sessions.
19. Can Chrome make RDS profiles large?
Yes. Chrome profiles can accumulate caches, website data, extensions, service-worker files, and other browser data.
20. Is it better to clean cache or delete an active user's profile?
For an active user, targeted cache/temp cleanup is normally preferable. Full profile deletion should be reserved for situations where the profile is no longer needed or must intentionally be rebuilt.
#WindowsServer #WindowsServer2019 #RDS #RemoteDesktop #RDP #WindowsAdmin #SystemAdministrator #SysAdmin #PowerShell #WindowsPowerShell #ServerManagement #ServerMaintenance #UserProfile #UserProfiles #ProfileCleanup #RDSProfile #DiskCleanup #CDrive #DiskSpace #StorageManagement #WindowsCleanup #ServerOptimization #WindowsOptimization #ITSupport #ITAdmin #ITInfrastructure #RemoteDesktopServices #WindowsTips #ServerTips #PowerShellTips #ActiveDirectory #DomainUser #LocalUser #AppData #Chrome #MicrosoftEdge #Outlook #TallyPrime #AccountingServer #BusinessIT #ServerStorage #SystemDrive #ProfileManagement #WindowsSecurity #ServerAdministration #ITMaintenance #RDSAdmin #TechSupport #WindowsTroubleshooting #BisonInfosolutions
Was this guide useful?
Your answer helps us keep BISONKB accurate and practical.