How to Recover Space When the Disk Is Full on Linux

Package cache, orphans, trash and logs, without touching personal files.

Easy 1 min read Published on 2026 By Equipo SolucionaPC
  1. Identify what's taking up the most space with du -sh /* 2>/dev/null | sort -rh | head -10.
  2. Clean the package cache with sudo apt clean.
  3. Remove orphaned packages with sudo apt autoremove.
  4. Empty the trash: rm -rf ~/.local/share/Trash/*.
  5. Check and clean old logs in /var/log if they're very large.

Warning: before deleting anything in /var/log manually, confirm you don't need those logs to diagnose some recent problem — when in doubt, compress instead of deleting.

Tip: combine these steps in this order — they usually resolve most full-disk cases without needing to delete personal files.

Frequently asked questions

Is it safe to delete files in /var/log?

With care — confirm you don't need those logs to diagnose a recent problem. It's safer to compress them than delete them directly if you have doubts.

Do these steps affect my personal files?

No, they focus on system cache, orphaned packages, and trash — your documents and personal files aren't affected by any of these steps.

Share: