Skip to content

Instantly share code, notes, and snippets.

@harshalbhakta
Last active March 31, 2023 09:10
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save harshalbhakta/887e4521a1043d36979b to your computer and use it in GitHub Desktop.
Save harshalbhakta/887e4521a1043d36979b to your computer and use it in GitHub Desktop.
Ubuntu Software Updater: Not enough free disk space

The upgrade needs a total of 81.5 M free space on disk '/boot'. Please free at least an additional 17.4 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.

http://askubuntu.com/questions/142926/cant-upgrade-due-to-low-disk-space-on-boot

Run below command as suggested in the error message.

$ sudo apt-get clean

First check your current kernel version.

$ uname -a

Then run the following command. This command will list all packages that you no longer need.

$ dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'

So for every package listed do the following:

$ sudo apt-get -y purge some-kernel-package

Remove packages that were installed as a dependency and are no longer required using the below command.

$ sudo apt-get autoremove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment