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,264
  • 56
  • 94
  • 147
Coding Mama
  • 133
  • 1
  • 1
  • 9
  • Why do you think Ubuntu tweak not supported ? It does the job. – ankit7540 May 19 '16 at 10:52
  • Hi. I did find a link to download it, but the dev is no longer supporting it. (The site has to be translated. Previous ubuntu-tweak links now go there.) Formally closed the Ubuntu Tweak Related Sites. I've never installed using the command line (a learning newbie), so once I figure that out, I will try it. I've read a lot of good things about it in forums. – Coding Mama May 20 '16 at 01:21
  • Please check the details and release notes on this page. In the very last release the support for 14.04 was added. Ubuntu Tweak Tool, launchpad-release notes I am using 0.8.7 version on 14.04 – ankit7540 May 20 '16 at 04:13
  • Thanks for that link @ankit7540. That is the version I downloaded the other day, so yay, and I'll give it a go after I figure out the install process. – Coding Mama May 20 '16 at 19:42
  • 3
    Installation worked, and now I'm trying to figure everything out. While researching here, I've found that a lot of people have lost configurations, desktops, menus, etc after using janitor in U-T. I'm not sure what they did, but I want to avoid that if possible, so I'm thoroughly reading those posts, and also trying to find out what some of my packages are before I mess with them. It may seem like a lot of unnecessary work to those who understand all of this, but I need to understand it and I'm really enjoying this process. – Coding Mama May 21 '16 at 08:09
  • this learning is addictive ;) – Zanna May 26 '16 at 11:50
  • Yes, it surely is. :) – Coding Mama May 27 '16 at 10:19
  • May I ask why you chose to have /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
  • I didn't make that choice. There wouldn't be any reason for me to even attempt something like that- especially as a beginner. This was a new install on a new 480 GB SSD. The boot partition is set to 255 MB. From what I remember, I was asked if I wanted to partition the drive, and I said NO. There was no need as I wasn't going to dual boot or anything like that. I don't know why it happened, but I'm upset about it, and I'm trying to figure out how to change it. – Coding Mama Jul 06 '16 at 20:31

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
  • 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
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
  • 70,465
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,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
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.