Skip to content

Troubleshooting Linux

JohnClarke edited this page Jul 30, 2025 · 2 revisions

🧹 Linux Disk Cleanup Guide

When /dev/root hits 100% usage, your system might become unstable. This guide helps free up space quickly and safely.

πŸ” Check Disk Usage

Run this command to identify the top space-consuming directories:

sudo du -h --max-depth=1 / | sort -hr | head -n 10

πŸ“¦ Remove Unused Packages

sudo apt-get autoremove
sudo apt-get clean

πŸ“ Delete Cache & Temp Files

User Cache

rm -rf ~/.cache/*

System Temp

sudo rm -rf /tmp/*

πŸ“œ Clear System Logs

Truncate log files in /var/log:

sudo truncate -s 0 /var/log/*.log

🚨 Emergency Access

If the system is unresponsive, boot using a Live USB and free up space from there.


βœ… Notes

  • Always back up important files before deletion.

  • For critical environments, use disk management tools like ncdu or bleachbit.


Last Updated: 30/07/2025 by JC

Clone this wiki locally