How to View Free Disk Space on Windows, macOS, and LinuxKnowing how much free disk space you have is essential for system performance, installing updates, creating backups, and avoiding unexpected failures. This guide covers multiple ways to view free disk space on Windows, macOS, and Linux — graphical tools, built-in utilities, and command-line commands — plus tips for interpreting results and freeing space.
Quick overview — what “free space” means
- Free space: storage not currently used by files and available for new data.
- Available space (on some systems): free space available to non-privileged users after system/reserved allocations are considered.
- Filesystems may reserve space for system use (e.g., ext4 often reserves 5%) so “free” can differ from space a regular user can actually use.
Windows
Using File Explorer (GUI)
- Open File Explorer (Win + E).
- Click “This PC” in the left sidebar.
- Each drive shows a bar and the free/total space beneath it.
- Right‑click a drive → Properties to see a pie chart and exact values for Used space, Free space, and Capacity.
When to use: quick check for casual users.
Settings > System > Storage (Windows ⁄11)
- Open Settings → System → Storage.
- Windows shows total used and free space for each drive and categories (Apps, System files, Temporary files).
- Click a drive or category for a deeper breakdown.
When to use: to find large files and cleanup recommendations.
Command Line: PowerShell
- To get free space for all logical drives:
Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{Name='Free(GB)';Expression={"{0:N2}" -f ($_.Free/1GB)}}, @{Name='Used(GB)';Expression={"{0:N2}" -f (($_.Used)/1GB)}}, @{Name='Total(GB)';Expression={"{0:N2}" -f ($_.Used + $_.Free)/1GB}}
- To show detailed volume info:
Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object DeviceID, @{N='FreeGB';E={[math]::Round($_.FreeSpace/1GB,2)}}, @{N='SizeGB';E={[math]::Round($_.Size/1GB,2)}}, FileSystem
When to use: scripting, remote checks, precise numeric output.
macOS
Finder (GUI)
- Open a Finder window.
- Select the drive under Locations or click the desktop drive icon.
- Press Command + I (Get Info) to see Capacity, Available (free), and Used.
- Alternatively, enable the status bar (View → Show Status Bar) to display available space at the bottom of Finder windows.
When to use: quick visual checks.
About This Mac → Storage
- Click Apple menu → About This Mac → Storage.
- The Storage tab shows a color-coded bar with Used and Free space and category breakdown (Apps, Photos, System, etc.).
When to use: to understand what kinds of files use space.
Terminal (command line)
-
Show mounted volumes and disk usage:
df -h
Look for lines like / or /Volumes/
and the “Avail” column. -
For a clearer per-volume listing:
diskutil info / | grep -E 'Volume Size|Free Space|Device Node'
When to use: remote access, scripting, or when GUI isn’t available.
Linux
Because Linux distributions and desktop environments vary, multiple approaches exist.
Graphical file managers (GNOME Files, Dolphin, etc.)
- Open your file manager and check the sidebar or drive properties (right-click → Properties) to see free and used space.
When to use: desktop users who prefer GUI.
Terminal: df
- A standard command to show free/used space on mounted filesystems:
df -h
- Columns: Filesystem, Size, Used, Avail (available to unprivileged users), Use%, Mounted on.
Example interpretation: Avail is the space ordinary users can use; Use% is how full the filesystem is.
Terminal: lsblk and du (for different needs)
- List block devices and sizes:
lsblk -f
- To find space used by a directory:
du -sh /path/to/directory
Terminal: tune2fs (ext2/3/4 specific)
- Check reserved blocks percentage:
sudo tune2fs -l /dev/sdXN | grep 'Reserved block count'
- To show reserved percentage:
sudo tune2fs -l /dev/sdXN | grep 'Reserved block percentage'
When to use: advanced filesystem info and when reserved space affects free space.
Interpreting results and common pitfalls
- “Available” vs “Free”: some commands report total free space including blocks reserved for root; others show only space available to regular users. On Linux, df’s Avail is what non-root users can actually use.
- Files in use: deleted files still held open by processes still occupy space until the process closes the file — they won’t show in directory listings but will reduce free space. Use lsof + deleted filter to find them:
sudo lsof | grep '(deleted)'
- Different units and rounding: GUI tools often round; command-line tools with -h (human-readable) convert units for readability. For exact bytes, omit -h.
How to free up disk space safely
-
Empty Trash/Recycle Bin.
-
Remove large unused applications.
-
Use built-in cleanup tools: Storage Sense (Windows), Manage Storage (macOS), BleachBit/apt autoremove (Linux).
-
Clear caches and temporary files (browser, system caches).
-
Move large media files to external drives or cloud storage.
-
On Linux, check for large log files in /var/log and compress or rotate them.
-
Before deleting, identify biggest consumers: “`bash
Linux: top 25 largest directories in /
sudo du -ahx / | sort -rh | head -n 25
macOS: similar
sudo du -sh /* | sort -hr | head -n 20
--- ## Automating checks and alerts - Windows: use PowerShell scripts scheduled with Task Scheduler to log free space and send alerts when below threshold. - macOS/Linux: cron (or launchd on macOS) with shell scripts to run df, parse results, and send mail/notifications. Example simple Linux check: ```bash #!/bin/bash THRESH=90 USAGE=$(df / | tail -1 | awk '{print $5}' | sed 's/%//') if [ "$USAGE" -ge "$THRESH" ]; then echo "Disk usage is ${USAGE}% on $(hostname) at $(date)" | mail -s "Disk space alert" [email protected] fi
Summary checklist
- Use GUI for quick checks and category breakdowns.
- Use command line (df, Get-CimInstance, diskutil, PowerShell) for scripting and precise metrics.
- Remember reserved space and in-use deleted files can make free space lower than expected.
- Regularly monitor and clean large/unused files to prevent issues.
If you want, I can: provide ready-to-run scripts for one of these OSes, walk through interpreting your system’s df/Get-CimInstance output, or tailor cleanup steps for your setup.
Leave a Reply