Skip to content

Instantly share code, notes, and snippets.

@LolWalid
Last active January 12, 2018 09:30
Show Gist options
  • Save LolWalid/9f904209178c4a5b408a83ae97684b94 to your computer and use it in GitHub Desktop.
Save LolWalid/9f904209178c4a5b408a83ae97684b94 to your computer and use it in GitHub Desktop.
Clean Ubuntu Partition

The purge

My Ubuntu Version

uname -r

All Kernel Installed

dpkg --list | grep linux-image

Get kernel to remove

dpkg --list | grep linux-image | grep -v `uname -r`

Time to purge

sudo apt-get purge $USELESS_VERSIONS

Autoremove Dependencies

sudo apt-get autoremove

Check Every things is good

sudo update-grub2 && sudo update-initramfs -u

Restart

sudo aptitude safe-upgrade && sudo reboot now

Source

https://boinst.wordpress.com/2013/05/14/clean-out-ubuntu-boot-partition/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment