0

I get the "Not enough free disk space" error about once a month during software updates. I'm getting tired of having to manually clear out old kernels every time I get this message.

Is there something I can do to prevent this issue from regularly occurring? I would like to have an automated solution so I don't have to manually remove old kernels every month.

I would think there would be something in place to prevent old unused kernels from accumulating like this.


I know there are a bunch of questions on here on how to clear up some disk space in /boot in order to get rid of this error. That is not my question. I have not found any solutions that prevent this error from being a regular issue. I will continue searching while this question is up though, just in case I missed something.

hal
  • 153
  • 2
  • 12
  • The closest thing I've found is this, which is not actually automatic, but is the fastest manual way I've found. – hal Apr 12 '15 at 19:49
  • Well, stop using /boot is one possibility. – muru Apr 12 '15 at 19:52
  • Wouldn't that just bloat some other part of my hard drive? Or am I misunderstanding you? – hal Apr 12 '15 at 19:57
  • No, you aren't misunderstanding me. But are all parts of your hard drive significantly restricted in size (<= 500MB)? Or perhaps you are.. What I meant is to stop keeping /boot in a separate partition. – muru Apr 12 '15 at 19:58
  • No my main partition is around 500GB. But over time wouldn't the space taken up by old kernels just keep growing until it's a problem again? – hal Apr 12 '15 at 20:00
  • We're talking ~40MB per kernel. At that rate, it just takes 6 old versions to fill up 250 MB (a typical /boot), but you would need 25 old versions to get to 1GB. An apt-get autoremove once a month and you'll never get that far. – muru Apr 12 '15 at 20:03
  • @muru Thanks, I'll definitely keep this in mind. I would still like to find a way to automate this though. – hal Apr 12 '15 at 20:12
  • @NGRhodes I don't see how this is a duplicate. That question is asking why autoremove doesn't remove old kernels and how they can get it to do so. I'm asking if there is a way to automate kernel removal so that I don't have to be constantly dealing with it. I'll add an edit to make this more clear. – hal Apr 12 '15 at 20:15
  • You can run apt-get autoremove once a month using cron. – muru Apr 12 '15 at 20:18
  • @muru Thanks! That sounds like exactly what I'm looking for. If you post that as an answer I'll mark it as accepted. – hal Apr 12 '15 at 20:23

0 Answers0