When you buy through our links, we may earn a commission. Learn more ›

How to Free Up Disk Space on Your Laptop

Short answer: Start in Settings > System > Storage. Turn on Storage Sense, run Disk Cleanup with the system files option, and review Cleanup recommendations. Then remove old package caches, container images, and virtual machine disks. Cleaning the built-in Windows areas first is safe and usually recovers the most space for everyday developers.

Start with the Windows built-in storage tools

If your drive is running low, start with the tools that come with Windows. Open Settings, then System, then Storage. That page gives you a breakdown of what is using space and puts Storage Sense and Cleanup recommendations in one place.

For a programmer, the biggest space consumers are often not the code editor. Dependencies, SDKs, package caches, container images, and virtual machine disks grow as projects do. The editor itself can be small: Visual Studio Code has a disk footprint under 500 MB according to its requirements. The environment around the editor is what fills the drive.

Before deleting anything, take a quick look at the storage overview. It shows which categories are using the most space: apps, documents, temporary files, or system files. That tells you whether to focus on Windows cleanup or on your development tools.

If you are choosing a new laptop, the storage explainer explains how much drive capacity to look for, and the main programming guide compares current models.

Use Storage Sense for routine cleanup

Storage Sense is the automatic cleanup option in Windows. It can remove temporary files, empty the Recycle Bin on a schedule, and clean files in known folders when storage is low. Turn it on in Settings > System > Storage > Storage Sense.

Set Storage Sense to run when disk space is low, and choose how long files stay in the Recycle Bin before deletion. This is a safe first pass because it focuses on temporary data. It will not clear your source tree.

Storage Sense is useful for temporary files from apps and Windows, Recycle Bin contents older than the age you set, and old files in Downloads or other known folders if you enable that option.

For developers, the most valuable part of Storage Sense is the temporary files category. Build tools, installers, and app caches often leave temp files behind. Running this tool weekly or monthly keeps the drive from filling up quietly.

  • Temporary files from apps and Windows
  • Recycle Bin contents older than the age you set
  • Old files in Downloads or other known folders if you enable that option

Run Disk Cleanup for system files

Disk Cleanup is the older, more direct tool for system files. Search for Disk Cleanup from the Start menu, select the drive you want to clean, and choose Clean up system files. It can remove Windows Update leftovers, old driver packages, and previous Windows installations.

Run Disk Cleanup after a feature update or when Windows Update has left large remnants. The tool shows the size of each category before you delete, so you can decide what to remove.

A useful habit is to run Disk Cleanup after every major Windows feature update. Those updates often keep the previous installation so you can roll back if something goes wrong. Once you are confident the new version is stable, removing that older copy can free a significant amount of space.

Disk Cleanup also covers items that Storage Sense does not always touch, such as old Windows upgrade logs and device driver packages. If you need to keep a rollback option, review the list before confirming.

Use Cleanup recommendations

Cleanup recommendations appear in Settings > System > Storage. Windows suggests temporary files, large files, unused apps, and files synced to cloud storage. Review each item before removing it.

This view is useful for finding large files you forgot about. Old downloads, saved installers, and exported logs are common candidates. The same screen can uninstall apps you no longer use.

If you work with multiple projects, large files can end up in odd places. Cleanup recommendations groups them by type, so you can spot a saved database dump or a big log file that is no longer needed. Always check the file path before you delete, especially if the file is in a project folder.

Cloud-synced files can be a special case. If the file exists in the cloud, Windows may offer to make it online-only and free the local space. That is a useful middle ground when you do not want to lose the file.

Clear the caches and images that developers accumulate

After the Windows tools have finished, look at the files your development tools created. Browser caches, package manager caches, node_modules folders, and build artifacts can take significant space without showing up in the standard Windows categories.

If you use Docker, container images and build cache are common space hogs. Running docker system prune removes dangling images and unused build cache. Prune volumes only after you confirm you do not need the data. The Docker and virtual machines guide covers how to choose a laptop with enough RAM and storage for this workflow.

For virtual machines, delete snapshots you no longer need and remove disks for retired projects. If you develop on macOS, Xcode keeps derived data and old simulators; removing them helps in the same way. Apple's Xcode system requirements page lists which macOS versions each Xcode release supports, and the container RAM explainer is a good next step if you are planning a new setup.

Package managers are another place to look. npm, pip, and other language package managers keep local caches so that repeated installs are faster. Clear the cache after a large install if you need room immediately. The cache rebuilds over time as you install dependencies again.

Plan your next storage budget

Cleaning is a temporary fix. If your drive keeps filling up, the long-term answer is to choose the next laptop with enough storage for the work you do. The how much storage guide walks through the trade-offs between 512GB, 1TB, and larger SSDs.

For Docker users, local images and build cache need regular attention. A machine with more storage gives you breathing room, but you will still want to prune stale images. The Docker laptop guide explains the RAM and storage specs to look for.

If you work with virtual machines, plan for the virtual disks to be larger than the operating system alone. A clean disk is easier to manage, but adding an extra drive or buying a larger SSD is often the more durable solution. The high-RAM guide helps if VMs are part of your daily workflow.

What to pick for your work

If youPickBuying guide
You write code in Windows with an editor and a local browser stackA dependable all-purpose model from the main guideBest Laptop for Programming in 2026: 14 Picks by Specs
You run Docker Desktop and containers dailyA model chosen for Docker and virtual machinesBest Laptops for Docker and Virtual Machines in 2026: 14 Picks
You build web apps with many dependenciesA current web development pickBest Laptops for Web Development in 2026: 14 Picks by Specs
You keep local virtual machines for testingA model with enough RAM from the higher-RAM guideBest 32GB RAM Laptops for Programming in 2026: 14 Picks by Specs
You are a student and carry your laptop to classA lightweight pick from the student guideBest Laptops for Computer Science Students in 2026
You regularly keep large container images or VM disksA high-RAM model from the 64GB guideBest 64GB RAM Laptops for Programming in 2026: 14 Picks

Questions

What is the safest way to free up disk space on a Windows laptop?

Start with Storage Sense in Settings, then run Disk Cleanup with the system files option, and review Cleanup recommendations. These tools remove temporary files, recycle bin contents, and Windows Update leftovers. They do not touch your programs or source files unless you choose to remove them.

Does Storage Sense delete files from my projects?

No. Storage Sense targets temporary files and recycle bin contents. It only cleans known folders if you enable that option, so keep project folders outside the cleaned locations or review the settings.

How often should I clear Docker images and build cache?

Run docker system prune when you notice the drive filling up or after large image builds. Dangling images and unused build cache are safe to remove. Volumes should be pruned only when you are sure the data is not needed.

What is the difference between Disk Cleanup and Cleanup recommendations?

Disk Cleanup is a separate utility that focuses on system files, Windows updates, and previous installations. Cleanup recommendations live in Settings and review temporary files, large files, and unused apps.

I cleared everything and still need space. What should I do next?

Consider moving large projects to an external drive or cloud storage. If you are choosing a new laptop, pick a model with a larger SSD. The programming laptop guide is a good place to compare current options.

Can I clean package manager caches without breaking my projects?

Yes. Package managers use caches to speed up future installs, but clearing the cache does not remove the packages already installed in your projects. You will simply redownload dependencies the next time you install them.

Recent updates

  • : First published.

Sources

Related buying guides