5

Like many others users, I need to remove files/kernels to increase space because I'm getting the error message that says I can't update because I have don't have enough space in /boot. I've searched for months, and I've found many answers that are similar to each other, but most are not applicable to Ubuntu 14.04 LTS, or the instructions are not beginner-friendly. Ubuntu-tweak is no longer supported by the dev, and I don't know if anyone else is picking that up. I found Synaptic Package Manager, so I'm studying that for now, but I'd like to know if there are any other programs that serve a similar purpose. Is there anything else out there? (I'd welcome updated info for command-line for 14.04 LTS as well.) Thanks for your input.

David Foerster
  • 36,890
  • 56
  • 97
  • 151

4 Answers4

7

I'd recommend letting apt handle this for you, using the command:

sudo apt-get autoremove

That should do everything you need. Once the process is complete, it's worthwhile checking the filesystem locations that Zanna has mentioned in her answer.

On a sidenote, I prefer to keep at least one old kernel version that I know works, just incase the current kernel suddenly stops working. I'm probably just being paranoid, but it's nice to have one to revert to.

Arronical
  • 20,241
4

I agree with @Arronical that autoremove does everything you want. In the interest of getting to know your system better, you could do all the work that autoremove does yourself. Start by opening a terminal and typing

uname -r

Write it down & for whatever you love most, do not hurt anything with that release number, or you will nuke yourself. And in general, type carefully and check what you entered before sudo rming anything ;)

I recommend always keeping at least 1 'spare' kernel that I know works well installed, in case of bugs (or just wanting to fiddle around)

dpkg --list | grep linux-image

to identify kernels currently installed, then purge:

sudo apt-get purge linux-image-x.x.x-x-generic

replacing x with the correct numbers for the release you want to remove

sudo update-grub

which seems to happen automatically when purging anyway. But no problem to run it again just in case. Next

ls /boot

and if anything remains relating to the kernel version(s) you removed just remove it

sudo rm /boot/name-of-file-to-remove

(replace with the actual name obviously). Next

ls /lib/modules

and if the kernel(s) you removed still has a directory in there

sudo rm -r /lib/modules/name.of.directory.to-remove

next

ls /usr/src

and if the kernel(s) you removed still has headers in there

sudo rm -r /usr/src/linux-headers-name.of.version.to.remove

finally (usually gets updated but just in case)

ls /var/lib/initramfstools

and once again remove anything with the version(s) you're deleting.


Mostly from this answer but I have added all the places for completeness.

Zanna
  • 72,312
1

I am still using ubuntu-tweak on 14.04.

It works nicely, and its janitor only requires a single click and two times typing the sudo password; and old modules and kernel stuff is gone for good. I find that far better than the other "manual procedures" listed so far.

GhostCat
  • 2,165
0

https://utappia.org/2016/03/28/ucaresystem-core-v3-0-released-and-available-in-ppa/

this one works quite well and thorough and safely.

Arup Roy Chowdhury
  • 1,580
  • 9
  • 12