--- title: "Free Up Disk Space on a Windows Workstation" slug: "dex-wf-free-up-disk-space-workstation" updated: 2026-11-30T16:13:12Z published: 2026-11-30T16:13:12Z canonical: "documentation.sysaid.com/dex-wf-free-up-disk-space-workstation" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.sysaid.com/llms.txt > Use this file to discover all available pages before exploring further. # Free Up Disk Space on a Windows Workstation Diagnose and reclaim storage on Windows endpoints when users hit low-disk warnings. **Complexity:** Beginner. **Impact:** endpoint-health + user-productivity + preventive-maintenance + windows. ## Why use this workflow Windows shows a low-disk warning when the system drive (usually `C:`) drops below roughly 10% free. Once free space falls under about 1 to 2 GB, Windows Update may fail, applications crash on save, temp files can't be written, and user productivity grinds to a halt. This workflow walks through the standard triage: identify what is consuming space, safely remove known-disposable data, and leave the workstation in a healthy state without touching user documents. Run this when a user reports a "Low Disk Space" toast, a red bar on the C: drive in File Explorer, application errors such as *"There is not enough space on the disk"*, or OneDrive/Teams sync failures caused by the local cache running out of room. ## Expected outcomes - The system drive has at least 15 to 20% free space restored. - Temporary files, Windows Update caches, old Windows installations, and Recycle Bin contents are cleared. - Top space consumers are identified so you know whether this is a recurring problem (e.g., oversized OneDrive cache, bloated user profile, large Downloads folder). - User data (Documents, Desktop, Pictures, Outlook OST within reason) is left intact. - Storage Sense is enabled so the machine self-maintains going forward. ## Risks and considerations ### Do not blindly delete - **Never delete from `C:\Users\<name>\` directly** without confirming with the user. Documents, Desktop, and Downloads often contain the only copy of important files. - **Outlook OST files** (in `%LocalAppData%\Microsoft\Outlook`) can be several GB. Deleting them forces a full resync, which is fine on a fast connection but painful on remote/VPN users. - **OneDrive/SharePoint cached files**: use "Free up space" from the OneDrive context menu rather than deleting the folder. - **Windows.old** can only be removed within 10 days of a feature update. After that Windows cleans it automatically. Do not force-delete it during that window or rollback becomes impossible. - **Hibernation file** (`hiberfil.sys`) can be large. Only disable hibernation on desktops. On laptops it breaks fast startup and hybrid sleep. - **Pagefile**: do not delete or disable unless you know the machine has adequate RAM and you understand the impact on crash dumps. ### Compliance On managed/regulated endpoints, check whether your DLP or eDiscovery policies require preservation of temp files or browser caches before running cleanup. ## Required permissions | Permission | Why it's needed | | --- | --- | | Local Administrator on the workstation | Required to run Disk Cleanup with system files, clear the SoftwareDistribution cache, and remove Windows.old. | | Intune Device Configuration (Read/Write) | Optional: only if deploying Storage Sense policy or a remediation script tenant-wide. | | DeviceManagementManagedDevices.ReadWrite.All | Graph permission required to trigger a proactive remediation or custom script against the device via Intune. | ## Ask Dex Paste the prompt into a Dex conversation. ### Prompt for IT admins ``` {user}'s workstation is showing a low-disk-space warning on C:. Connect to the device, identify the top space consumers, run a safe cleanup (temp files, Windows Update cache, Recycle Bin, Delivery Optimization), enable Storage Sense, and report free space before and after. ``` ### How an end user can ask Dex ``` My laptop keeps saying it's running out of space and some apps won't open. Can you help me clean it up? ``` ## Manual steps (admin center) ### 1. See what's using the space 1. Open **Settings** > **System** > **Storage**. 2. Wait for Windows to categorize usage (Apps, Temporary files, System & reserved, etc.). 3. Note the top 2 to 3 categories. These are your targets. ### 2. Run Storage cleanup 1. Still under **Settings** > **System** > **Storage**, click **Temporary files**. 2. Review the checklist. Safe to tick: *Windows Update Cleanup, Delivery Optimization Files, Thumbnails, Temporary files, Recycle Bin, Previous Windows installations* (only if more than 10 days old and the user agrees), *Downloads* (only with user consent). 3. Click **Remove files**. ### 3. Turn on Storage Sense (prevent recurrence) 1. Under **Storage**, toggle **Storage Sense** on. 2. Click it to configure: run *Every week*, delete files in Recycle Bin after *30 days*, delete files in Downloads *Never* (safer default), and set OneDrive content to become online-only after *30 days*. ### 4. Uninstall unused apps 1. Go to **Settings** > **Apps** > **Installed apps**. 2. Sort by **Size (largest first)**. 3. Remove anything the user confirms is unused (old games, trial software, duplicate browsers). ### 5. Offload OneDrive files 1. Right-click the OneDrive folder in File Explorer. 2. Choose **Free up space**. Files become online-only but still visible. ### 6. Visualize remaining large files (optional) If space is still tight, install **WizTree** or **TreeSize Free** (both admin-approved in most environments) to find rogue log files, old VM images, or dev artifacts. Never delete anything under `C:\Windows` or `C:\ProgramData` without certainty. ## Microsoft Graph API **Not applicable for direct Windows disk cleanup.** Windows does not expose a native REST API for local disk operations. If you manage the fleet with Intune, you can automate this at scale using **Proactive Remediations** (script packages). The Graph API endpoint to deploy one is: ``` POST https://graph.microsoft.com/beta/deviceManagement/deviceHealthScripts ``` You upload a detection script and a remediation script (both PowerShell), then assign them to a device group. To trigger an on-demand run against a specific device: ``` POST https://graph.microsoft.com/beta/deviceManagement/managedDevices/{deviceId}/initiateOnDemandProactiveRemediation Content-Type: application/json {  "ScriptPolicyId": "" } ``` For a single workstation, the PowerShell approach below is faster and more practical. ## PowerShell Run PowerShell **as Administrator** on the affected workstation. A full cleanup follows this sequence: 1. Report current free space. 2. Empty user and system temp folders. 3. Clear the Windows Update download cache (`SoftwareDistribution\Download`). 4. Run the built-in `cleanmgr` with a preset profile (no GUI prompts). 5. Empty the Recycle Bin for all users. 6. Report final free space and space reclaimed. ### Quick one-liners ``` # Check free space Get-Volume -DriveLetter C | Select-Object DriveLetter, @{n='FreeGB';e={[math]::Round($_.SizeRemaining/1GB,2)}}, @{n='TotalGB';e={[math]::Round($_.Size/1GB,2)}} # Clear user temp Remove-Item -Path "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue # Clear Windows Update cache (requires admin) Stop-Service wuauserv -Force Remove-Item -Path "C:\Windows\SoftwareDistribution\Download\*" -Recurse -Force -ErrorAction SilentlyContinue Start-Service wuauserv # Empty Recycle Bin Clear-RecycleBin -Force -ErrorAction SilentlyContinue ```