Tuesday, 28 March 2017

Ubuntu dev machine space management

Visualize filesystems usage:
df -h
Show disk usage of un/hidden folders
 du -sch .[!.]* * |sort -h


Find working kernel
uname -r
List installed kernels
dpkg --list | grep linux-image 


Sort and display packages size:
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
Completely delete a package
sudo apt-get purge packagename
Delete unused packages
sudo apt-get autoremove
Clean Apt cache
sudo apt-get clean


Brew cache cleanup
rm -rf $(brew --cache)
Brew uninstall
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

RVM
rvm uninstall ruby-2.3.3
Uninstall gems
gem uninstall -aIx

NPM cache cleanup
npm cache clean
Yarn (Node.js) cache cleanup
yarn cache clean

No comments:

Post a Comment