comakingspace / do-something

CoMakingSpace tasks and small projects
21 stars 2 forks source link

/boot is nearly full on 3D printing computer #91

Closed LukasFreeze closed 5 years ago

LukasFreeze commented 5 years ago

The 3D printing PC gives out a warning at startup, stating that only ~800kb remain in the "boot" partition.

Could someone with Linux skills please help? It looks like there are a couple old versions in there that could be deleted, but I don't want to mess anything up.

emka commented 5 years ago

See for example https://gist.github.com/ipbastola/2760cfc28be62a5ee10036851c654600 (Case I).

In short, this should do it all in one:

sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v $(uname -r) | while read -r line; do sudo apt-get -y purge $line;done;sudo apt-get autoremove; sudo update-grub
LukasFreeze commented 5 years ago

Thanks! It threw a few errors along the way but worked fine, now there are about 380 MB of free space again :+1: