Last active
August 27, 2018 12:58
-
-
Save michaelaguiar/90cfd7e523399fc76eb2 to your computer and use it in GitHub Desktop.
Clean up disk space - Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show top 10 biggest subdirs in the current dir. | |
du -sk * | sort -nr | head -10 | |
# Check if you have old kernels for deletion | |
ls -lh /boot | |
# Cleaning packages | |
sudo apt-get autoremove | |
sudo apt-get autoclean | |
# View list of all installed packages, sorted by size. If you see something big and don't use it - uninstall it | |
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -nr | less | |
# Check content of /var/tmp/ | |
du -sh /var/tmp/ | |
# Check deborphan | |
man deborphan | |
# Search for large files | |
find / -type f -size +1024k | |
# or | |
find / -size +50000 -exec ls -lahg {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment