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.

- 36,264
- 56
- 94
- 147

- 133
- 1
- 1
- 9
4 Answers
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.

- 19,893
-
Thanks for your input, Arronical! I'm nervous about removing anything, so having a "backup" kernel seems like a good idea to me. – Coding Mama May 20 '16 at 02:51
-
I've found that
apt-get autoremove
leaves me with the current kernel and the most recent previous version. It lists what will be removed and asks you to confirm that you want to continue. For your usage it's probably best to see which version numbers are in/boot
then check that the command won't remove any you want to keep. It does remove all of the files mentioned by Zanna, and update grub for you too. Good luck! – Arronical May 20 '16 at 08:33 -
Yes, I'm checking to see what versions are in /boot now. Trying anyway. I'm pulling it all together in my head (a risky venture), and I'll update all of you when I've succeeded. Thanks so much! – Coding Mama May 20 '16 at 23:06
-
I have used this 2 (possibly 3) times now, and it has worked very well each time. I used it when I couldn't update, and after using it, I could update. Yay, and thank you again! – Coding Mama Jul 15 '16 at 10:53
-
Good stuff, glad it's working well for you. It's always nice to have a reliable way to do common tasks, especially when it doesn't involve installing another package! – Arronical Jul 18 '16 at 08:31
-
Definitely! I actually refer back to this page every time I need to do this. :) I'm so grateful for your help, and everyone else's here, too. :) – Coding Mama Jul 29 '16 at 19:12
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 rm
ing 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.

- 70,465
-
1Thanks so much for your detailed response, Zanna. It's much appreciated. I'm going to try it this weekend. Thanks again! – Coding Mama May 20 '16 at 01:29
-
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.

- 2,095
-
Thank you for sharing that. I've heard a lot of good things about ubuntu-tweak, but I was sad to hear the dev decided to terminate the project, and I don't know whether or not anyone picked it up. Many of the previous links only point to this site now. Formally closed the Ubuntu Tweak Related Sites – Coding Mama May 20 '16 at 02:11
-
But I have to add: you are fully correct: the PPA page for ubuntu-tweak explicitly says: no longer maintained. And on 16.04, the 0.87 deb won't install (cleanly) any more. – GhostCat May 23 '16 at 11:55
-
Thanks! I appreciate that. I wish I was wrong. Sadly, the links I posted to the devs info don't work anymore either. As I mentioned above, I've seen recent posts from people who say they've lost configurations, desktops, menus, etc after using janitor. They didn't mention what they did from A to Z, so I'm a little scared to try it now. I chickened out at the last second. Since it won't install cleanly on 16.04, I guess no one has taken over the project. – Coding Mama May 25 '16 at 23:49
-
Lets be precise: I used the janitor for packages/kernels ... and never had problems! – GhostCat May 26 '16 at 13:07
-
That's awesome, and I'm glad to hear it. I hope that will be my result as well. – Coding Mama May 27 '16 at 10:20
-
@CodingMama Fyi: I am using the ucaresystem-core since lately on 16.04; and I am quite happy with it. – GhostCat Jul 15 '16 at 10:55
-
Great! Thanks for letting me know. It's definitely something else to consider. – Coding Mama Jul 15 '16 at 10:57
https://utappia.org/2016/03/28/ucaresystem-core-v3-0-released-and-available-in-ppa/
this one works quite well and thorough and safely.

- 1,580
-
1I hadn't heard of that one. Thanks so much for the information. I really appreciate it! – Coding Mama May 20 '16 at 02:02
/boot
on a separate partition and how much space it holds? That doesn't seem like a sensible choice for a Linux beginner. – David Foerster Jul 06 '16 at 08:53