If you're encountering a "no space left" error on your Kali Linux system, here are several solutions to free up space:
Quick Fixes
Clear APT cache:
sudo apt clean sudo apt autoclean
Remove old kernels (keep the current one):
sudo apt purge $(dpkg -l | grep 'linux-image-' | awk '{print $2}' | grep -v $(uname -r))
Remove orphaned packages:
sudo apt autoremove --purge
More Space Recovery Options
Check largest files/directories:
sudo du -h --max-depth=1 / | sort -h
Clear system logs:
sudo journalctl --vacuum-size=50M sudo rm -rf /var/log/*
Remove downloaded package files:
sudo rm /var/cache/apt/archives/*.deb
If You're Using a VM
Expand virtual disk: If using VirtualBox/VMware, you may need to:
Increase the virtual disk size in VM settings
Use GParted to expand the partition
Prevention Tips
Regularly clean up unused packages
Monitor disk usage with
df -h
Consider moving large files to external storage
No comments:
Post a Comment