Today I found a pop up message on one of my Ubuntu machines that said the boot partition was low on space. I did a search on the web for a cleaning solution for the boot partition and found this page:
I found some flaws in this script so I came with this one trying to improve it:
dpkg -l 'linux-*' | \
# We only need the second column of the installed linux-* packages list
awk '/^ii/ { print $2 } ' | \
# Take out the packages with the number of the running kernelĀ
grep -v $(uname -r | sed 's/\([0-9.-]\+\)-[^0-9]\+/\1/') | \
# The -v force me into this extra line
grep '[0-9]' | \
xargs sudo apt-get -y purge
Later I'll try to improve it a little bit more.
posted by J. Ernesto Aneiros at 1:47 PM on Jan 24, 2012
"Cleaning the boot partition in Ubuntu"
No comments yet. -