How do I fix a full disk error?

A full disk error occurs when a hard drive or disk partition becomes full and additional data cannot be saved. This is a common error that can happen on any type of computer from desktop PCs to servers. The good news is that a full disk error can usually be easily fixed by freeing up space on the drive.

What causes a full disk error?

There are a few main causes of a full disk error:

  • Running out of storage space – This is the most common cause. Over time, accumulated files such as documents, photos, downloads, and programs will eventually use up all available storage space.
  • Fragmented hard drive – When files become fragmented across the hard drive, it takes up more space than necessary. This leads to less usable free space.
  • Temporary files – Applications and systems create temp files that take up drive space. These include browser caches, system restore points, download caches, etc.
  • Log files – Applications and systems log activity in log files. Over time these can consume significant storage space.
  • Bad sectors – Damaged parts of the hard drive that cannot be written to will also show as occupied space.

How to check available disk space

Before trying to fix a full disk error, you should first check how much free space is available on the drive. This helps identify how much space needs to be freed up.

On Windows, you can check disk space by:

  • Opening File Explorer, right-clicking the hard drive, and selecting Properties. The overview shows total and available space.
  • Going to This PC and looking under Devices and Drives. This shows all drives and how full they are as a percentage.
  • Using the ‘df -h’ command in Command Prompt to see drive space and usage.

On Mac OS, you can check disk space by:

  • Clicking the Apple menu and selecting About This Mac > Storage. This shows storage usage per drive.
  • Using Finder to get info on the boot drive. Get Info on the drive shows total and available space.
  • Using the ‘df -h’ terminal command to see drive space and usage for all mounts and disks.

On Linux, you can check disk space with the ‘df -h’ command or using a graphical disk utility like Baobab.

How to free up disk space

Once you’ve confirmed the drive is full, the next step is freeing up space. Here are some ways to clear disk space:

Delete unused files

Go through your files and delete anything you no longer need. Some places to check:

  • Downloads folder – Empty unneeded installers, archives, disk images and other downloaded files.
  • Documents – Remove files and projects you no longer use.
  • Media files – Delete unused photos, videos and music.
  • Trash/Recycle Bin – Empty the trash or recycle bin.
  • Old system files – Remove previous Windows installations and update installers.

Use disk cleanup utilities

Specialized disk cleanup tools can find and delete system files and other unused data:

  • On Windows use Disk Cleanup to remove temporary files, old updates, logs, etc.
  • On Mac run a periodic Finder cleanup to wipe caches and logs.
  • On Linux use utilities like BleachBit and Stacer to clean system files.

Uninstall unused programs

Removing software you no longer use can recover significant space:

  • On Windows go to Add/Remove Programs and uninstall unneeded apps.
  • On Mac go to Finder > Applications and drag apps to Trash to uninstall.
  • On Linux use your package manager like apt, rpm, etc to remove software.

Move data to external storage

If you have a lot of large files like videos, photos, music and backups, consider moving them to an external drive:

  • An external USB drive gives you lots of extra space for files and backups.
  • Cloud storage services like Dropbox, Google Drive and iCloud let you move data off your main disk.
  • A NAS (Network Attached Storage) device provides centralized networked storage.

Resize or add partitions

Another option is to reconfigure your disk partitions to add more space:

  • Use Disk Management on Windows to expand a partition after deleting another one.
  • On Linux use a tool like GParted to resize, create or delete partitions.
  • Consider adding a new larger drive and partitioning it efficiently.

How to find and remove fragmented files

Fragmentation occurs when files become scattered across the hard drive. This takes up more space than necessary. Defragmenting files consolidates the data so it uses less space.

Check file fragmentation

You can check the level of fragmentation on your hard drive by:

  • Using the Optimize Drives utility in Windows to analyze fragmentation.
  • Running defrag commands like ‘iDefrag’ or ‘Defraggler’ on Mac and Linux.
  • Checking the S.M.A.R.T. data for your drive to see if fragmentation is reported.

Defragment your hard drive

If heavy fragmentation is found, defragging the drive can optimize file storage:

  • On Windows run the built-in Defragment and Optimize tool.
  • On Mac run iDefrag or Drive Genius to defrag.
  • On Linux use utilities like Shake and Defraggler.

Defragging consolidates all file fragments, speeding up the system while also freeing up space.

Determine what is using up disk space

If you’re still low on free space after basic cleaning, you’ll need to analyze what’s occupying your drive space. Here’s how to get a detailed breakdown:

On Windows

  • Use TreeSize, WinDirStat or SpaceSniffer to visualize disk usage.
  • Access ‘Storage sense’ on Windows 10/11 to see usage per folder.
  • Check ‘df -h’ in Command Prompt to see usage per disk partition.

This gives you a percentage breakdown of space used per folder and file type.

On Mac

  • Use Finder’s Get Info to see usage for the whole disk and folders.
  • Download DaisyDisk or Disk Inventory X for a visual map of disk space usage.
  • Use ‘df -h’ in Terminal to see partition usage.

Identify the folders using the most space. Music, videos, photos and backups are often the culprit.

On Linux

  • Use the NCurses Disk Usage (NCDU) tool for CLI usage breakdown.
  • Install utilities like Baobab, Filelight and QDirStat for interactive maps.
  • Use ‘df -h’ to see usage per disk partition.

This helps pinpoint where your storage is being consumed.

Clear browser caches and histories

Web browsers store a lot of temporary data that can be safely deleted to recover space:

Clear Chrome data

  • Go to Settings > Advanced > Privacy and security > Clear browsing data.
  • Choose time range, data types, then click Clear data.

Clear Firefox data

  • Go to History > Clear Recent History.
  • Select time range, data types, then click Clear Now.

Clear Edge data

  • Go to Settings and more > Privacy, search, and services > Choose what to clear.
  • Check data types, select time period, then click Clear now.

This frees up gigabytes of disk space in temporary browser storage.

Remove Windows previous installation files

Windows keeps original installation files after major updates. You can safely remove these WinSxS folders to recover space:

  • Open Windows Explorer and go to C:\Windows\WinSxS folder.
  • Sort by size and look for the largest folders related to old versions.
  • Delete the unneeded WinSxS folders for old installations.

Make sure not to delete folders for your current Windows version.

Clear app residual and update files

Applications often leave behind residual data that can be cleared after uninstalling. Also look for old installer packages:

  • Browse Program Files and ProgramData folders for unused app leftovers.
  • Go through C:\Windows\SoftwareDistribution and delete old Windows updates.
  • Search for *.msi and *.msp files and remove ones you don’t need.

Removing this unused residual data can recover a good amount of disk space.

Check for and remove malware

If your computer is infected by malware, it can consume disk space with unwanted files:

  • Scan for malware and rootkits using malware tools like Malwarebytes.
  • Check running processes and startup items for anything suspicious.
  • Review installed browser extensions and remove malicious or unknown ones.

Removing malware, viruses, spyware and other infections frees up valuable disk real estate.

Delete system restore points

The Windows System Restore feature uses shadow copies to maintain restore points. These can build up over time and take up significant disk space:

  • Go to System Protection and check space used by system restore.
  • Delete any restore points you don’t need.
  • Consider disabling System Restore entirely if space is extremely limited.

This can recover 10GB or more of space from unneeded restore point data.

Enable storage space reclamation

On SSDs and SANs, you may need to manually reclaim unused space from deleted files and volumes:

  • On Windows, run ‘optimize-volume’ in Powershell on the drive.
  • On Linux, use fstrim, discard, or trim to reclaim space.
  • On Mac with SSDs, maintenance is not needed.

Enabling TRIM/UNMAP ensures all unused blocks are returned to free storage.

Expand volume or add new disk

If you are still very low on space, expanding the storage capacity is the ultimate solution:

Option Details
Extend Volume Use disk management to extend a partition to unallocated space, if available.
Add Drive Add an new physical internal or external drive for more storage.
Upgrade Internal Replace the boot drive with a larger capacity drive and reinstall the OS.

This adds long term breathing room when you are chronically short on disk space.

Conclusion

Running out of disk space is a common issue that can happen on any computer. The key steps to fixing it are:

  • Check how much free space is available.
  • Delete unused files and clear caches/histories.
  • Uninstall unneeded software and media.
  • Move data files to external storage.
  • Defragment the disk to optimize space usage.
  • Extend volume size or add new drives if needed.

Following these tips will help you reclaim disk real estate when dealing with a full drive. Be sure to regularly monitor your storage usage to catch any capacity issues early. Addressing it before running completely out of space will make the process faster and easier.