Clean Up the Disk Space of your Ubuntu
Recently i was running out of space at my primary SSD hard drive.
I tried to cleanup unused stuff and i found some space wasters.
Old Linux Kernels
Here i found a very useful command to remove old kernels.
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
Remove unneeded modules
sudo apt-get autoremove
Remove Elasticsearch related data
curl "localhost:9200/_nodes/settings?pretty=true"
# Check settings.path.data f.e. /var/lib/elasticsearch
rm -rf /var/lib/elasticsearch/elasticsearch/nodes/0/indices/<unused-indices>
# Remove elasticsearch log files
rm -rf /var/log/elasticsearch/*
Written by Ralph Meier
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Clean data
Authors
daraff
1.475K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#