Choose style:

Author Topic: Software Update & Upgrade - basic question [SOLVED]  (Read 1798 times)

0 Members and 1 Guest are viewing this topic.

Offline Mynaardt

  • Member
  • ***
  • Posts: 160
  • Karma: 18
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Software Update & Upgrade - basic question [SOLVED]
« on: April 30, 2015, 10:49:49 pm »
Hi All!

I kept getting the software updater telling me there wasn't enough free disk space in /boot for the upgrade in Peppermint to work.

So, I tried the old tried and true script file I use for that.
Code: [Select]
#!/bin/bash
sudo apt-get update && sudo apt-get -y dist-upgrade

That then gave me a message about a problem of disk space or some such (sorry, I didn't think to copy it properly).  With a suggestion of using autoremove.  I didn't realize all that old STUFF (about 1 GB's worth) was piling up there.

Since I was still in the terminal, I typed the following, as suggested:
Code: [Select]
sudo apt-get autoremove

That seemed to remove tons of files.  Including several different headers for the Linux Kernel.  I think.  After that, the GUI software updater gave me the message all was updated, reboot needed.  Everything is fine now.

After all that, my question is:
Is it a good idea (or habit) to use sudo apt-get autoremove when you upgrade or update the software?  Or maybe use that once a month or something?
 ???

Thanks in advance!
« Last Edit: May 01, 2015, 11:01:48 am by Mynaardt »
~*~  Mynaardt  ~*~
(Victoria, BC, Canada)
Peppermint OS is your computer's friend,
Always Trust Peppermint OS!

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Software Update & Upgrade - basic question
« Reply #1 on: May 01, 2015, 01:04:06 am »
Hi Mynaardt, how's it going?  That's another easy one to fix.  You have too many old kernels in /boot - it's full up :).  It's  housekeeping time :D.  Open up a terminal window and enter the following command:
Code: [Select]
dpkg -l | grep linux-image
Hit enter and post the output back to the forum  ;).
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline Mynaardt

  • Member
  • ***
  • Posts: 160
  • Karma: 18
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Software Update & Upgrade - basic question
« Reply #2 on: May 01, 2015, 01:39:46 am »
Hi (again) AndyInMokum:

Okay, here's the result of that grep thingy:

Code: [Select]
$ dpkg -l | grep linux-image
rc  linux-image-3.13.0-29-generic                               3.13.0-29.53                            amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-48-generic                               3.13.0-48.80                            amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-49-generic                               3.13.0-49.83                            amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-51-generic                               3.13.0-51.84                            amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-33-generic                               3.16.0-33.44~14.04.1                    amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-3.16.0-34-generic                               3.16.0-34.47~14.04.1                    amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-3.16.0-36-generic                               3.16.0-36.48~14.04.1                    amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-29-generic                         3.13.0-29.53                            amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-48-generic                         3.13.0-48.80                            amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-49-generic                         3.13.0-49.83                            amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-51-generic                         3.13.0-51.84                            amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-33-generic                         3.16.0-33.44~14.04.1                    amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-extra-3.16.0-34-generic                         3.16.0-34.47~14.04.1                    amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-extra-3.16.0-36-generic                         3.16.0-36.48~14.04.1                    amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-generic                                         3.13.0.51.58                            amd64        Generic Linux kernel image
ii  linux-image-generic-lts-utopic                              3.16.0.36.28                            amd64        Generic Linux kernel image

I figured it was housekeeping time.  I just don't know how to go about this kernel image tidy-up.  Yet.
 ::)

Thanks!
~*~  Mynaardt  ~*~
(Victoria, BC, Canada)
Peppermint OS is your computer's friend,
Always Trust Peppermint OS!

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Software Update & Upgrade - basic question
« Reply #3 on: May 01, 2015, 03:35:03 am »
Hi Mynaardt, wow, you have a fine collection of old kernels there  ;D.  What we are going to do, is remove all but the current one and the penultimate one.  That way you have one to fall back to if the current one fails on your machine for whatever reason, (highly unlikely to happen, but it's good to play safe ;)).

Open a terminal window with the following keystrokes: Ctrl+Alt+t.  Enter the following long command, (I highly recommend using the, Code: [Select] function below).  Click on the centre mouse button while your cursor is in the terminal window to paste the command.
Code: [Select]
apt remove --purge linux-image-3.13.0-29-generic linux-image-extra-3.13.0-29-generic linux-image-3.16.0-33-generic linux-image-extra-3.16.0-33-generic linux-image-3.16.0-34-generic linux-image-extra-3.16.0-34-generic linux-image-3.16.0-36-generic linux-image-extra-3.16.0-36-generic linux-image-3.13.0-48-generic linux-image-extra-3.13.0-48-generic -y
Hit enter and enter your user password.  Hit enter again.  To check which kernels you still have installed.  Run the following command again:
Code: [Select]
dpkg -l | grep linux-image
You should have two kernels displayed: linux-image-3.13.0-49-generic, linux-image-3.13.0-51-generic and the associated extras.  To tidy things up.  Run the following command:
Code: [Select]
apt clean && apt autoclean && apt autoremove -y
Hit enter and enter your user password if asked.  Hit enter again.  Now run:
Code: [Select]
apt update && apt dist-upgrade -y
Hit enter.  This will now bring your system up to date.  Reboot your system as there will have been a kernel upgrade.  That's the housekeeping all done  8).  I hope this helps - have fun  ;)!!
« Last Edit: May 01, 2015, 10:41:14 am by AndyInMokum »
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline Mynaardt

  • Member
  • ***
  • Posts: 160
  • Karma: 18
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Software Update & Upgrade - basic question
« Reply #4 on: May 01, 2015, 11:00:51 am »
Hi AndyInMokum:

It worked just fine!  I'm going to make note of that.  I was unaware that the old kernel images were just piling up there.  I just assumed (incorrectly) that the upgrade process removed old kernel when installing the new one.  Oh well, live and learn.  Now I know.

Thanks so much for all that!
 8)
~*~  Mynaardt  ~*~
(Victoria, BC, Canada)
Peppermint OS is your computer's friend,
Always Trust Peppermint OS!

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4893
  • Karma: 1053
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 10 (64-bit)
Re: Software Update & Upgrade - basic question [SOLVED]
« Reply #5 on: May 01, 2015, 11:41:55 am »
That's outstanding news  8).  No, the system won't automatically remove old or redundant kernels.  The logic being that you had to initially grant permission for them to be installed.  It would be counter intuitive to remove them without you knowing or without your permission.  This is another of the features that helps to make Linux so secure; you're in control  ;).

Yeah, just run this piece of housekeeping periodically.  Just be careful you don't delete the current kernel.  I'm very happy it helped you out - have a great weekend  ;)!!
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline WallyA

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 15
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 5
Re: Software Update & Upgrade - basic question [SOLVED]
« Reply #6 on: May 02, 2015, 11:11:48 am »
Ubuntu Tweak is a nice tool for cleaning up old kernels if you prefer a gui option.

Offline Mynaardt

  • Member
  • ***
  • Posts: 160
  • Karma: 18
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Software Update & Upgrade - basic question [SOLVED]
« Reply #7 on: May 03, 2015, 01:56:37 am »
Hi, WallyA:

Thanks for that.  I'll try looking at that too.
~*~  Mynaardt  ~*~
(Victoria, BC, Canada)
Peppermint OS is your computer's friend,
Always Trust Peppermint OS!