Page 4 of 4 FirstFirst ... 234
Results 31 to 33 of 33

Thread: Ubuntu Trusty Partial Updates on New Install?

  1. #31
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Ubuntu Trusty Partial Updates on New Install?

    Quote Originally Posted by cariboo907 View Post
    I use a script on my headless server to remove old kernels, that works well for me:

    Code:
    dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get purge
    Does a dry run, without removing anything, if everything looks good, then run:

    Code:
    dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
    Note: the only difference between the two commands is that the -y option is added before the purge option in the second command.
    Interesting.... Is that supposed to remove the previous kernel as I have 2 kernels installed at present - 3.13.0-8-generic and 3.13.0-7-generic.
    When I ran the first part it said it was going to remove the 3.13.0-7-generic which would leave me with only one.

    You would probably only use this if you knew a new kernel was just installed and you had 3 at the time you ran the script. Is that accurate?
    That is pretty nice.

  2. #32
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Ubuntu Trusty Partial Updates on New Install?

    I usually ignore my server, and just use it, it's only when I log into via ssh that I see a new kernel has been installed. I also only reboot, when I think about it. There is no access to this server from the outside world, so there's no problem with only rebooting occasionally. As you can see from the uprecords output, I've had several kernals installed:

    Code:
    uprecords
         #               Uptime | System                                     Boot up
    ----------------------------+---------------------------------------------------
         1    98 days, 19:58:28 | Linux 3.2.0-53-generic    Wed Sep 11 20:20:19 2013
         2    54 days, 07:33:04 | Linux 3.2.0-39-generic    Thu Mar 28 14:00:52 2013
         3    48 days, 00:51:53 | Linux 3.2.0-57-generic    Thu Dec 19 15:19:27 2013
         4    43 days, 11:40:26 | Linux 3.2.0-34-generic    Fri Dec  7 11:24:15 2012
         5    32 days, 01:57:36 | Linux 3.2.0-39-generic    Sat Aug 10 18:22:56 2013
         6    25 days, 21:37:33 | Linux 3.2.0-36-generic    Sun Jan 20 15:05:28 2013
         7    21 days, 03:24:31 | Linux 3.2.0-39-generic    Thu Jul 11 17:41:29 2013
         8    12 days, 22:32:40 | Linux 3.2.0-37-generic    Fri Feb 15 12:42:21 2013
         9    12 days, 17:49:17 | Linux 3.2.0-38-generic    Sat Mar  2 16:05:51 2013
        10    11 days, 19:51:40 | Linux 3.2.0-39-generic    Sun Jun  2 19:38:53 2013
    ----------------------------+---------------------------------------------------
    ->  16     4 days, 02:47:31 | Linux 3.2.0-58-generic    Wed Feb  5 16:09:46 2014
    ----------------------------+---------------------------------------------------
    1up in     0 days, 16:34:33 | at                        Mon Feb 10 11:31:49 2014
    t10 in     7 days, 17:04:10 | at                        Mon Feb 17 12:01:26 2014
    no1 in    94 days, 17:10:58 | at                        Thu May 15 13:08:14 2014
        up   424 days, 12:05:30 | since                     Fri Dec  7 11:24:15 2012
      down     4 days, 19:27:32 | since                     Fri Dec  7 11:24:15 2012
       %up               98.879 | since                     Fri Dec  7 11:24:15 2012
    The last time I cleaned out old kernels, there were three to be removed after I determined that it booted into the latest one successfully.

  3. #33
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Ubuntu Trusty Partial Updates on New Install?

    Quote Originally Posted by cariboo907 View Post
    I usually ignore my server, and just use it, it's only when I log into via ssh that I see a new kernel has been installed. I also only reboot, when I think about it. There is no access to this server from the outside world, so there's no problem with only rebooting occasionally. As you can see from the uprecords output, I've had several kernals installed:

    Code:
    uprecords
         #               Uptime | System                                     Boot up
    ----------------------------+---------------------------------------------------
         1    98 days, 19:58:28 | Linux 3.2.0-53-generic    Wed Sep 11 20:20:19 2013
         2    54 days, 07:33:04 | Linux 3.2.0-39-generic    Thu Mar 28 14:00:52 2013
         3    48 days, 00:51:53 | Linux 3.2.0-57-generic    Thu Dec 19 15:19:27 2013
         4    43 days, 11:40:26 | Linux 3.2.0-34-generic    Fri Dec  7 11:24:15 2012
         5    32 days, 01:57:36 | Linux 3.2.0-39-generic    Sat Aug 10 18:22:56 2013
         6    25 days, 21:37:33 | Linux 3.2.0-36-generic    Sun Jan 20 15:05:28 2013
         7    21 days, 03:24:31 | Linux 3.2.0-39-generic    Thu Jul 11 17:41:29 2013
         8    12 days, 22:32:40 | Linux 3.2.0-37-generic    Fri Feb 15 12:42:21 2013
         9    12 days, 17:49:17 | Linux 3.2.0-38-generic    Sat Mar  2 16:05:51 2013
        10    11 days, 19:51:40 | Linux 3.2.0-39-generic    Sun Jun  2 19:38:53 2013
    ----------------------------+---------------------------------------------------
    ->  16     4 days, 02:47:31 | Linux 3.2.0-58-generic    Wed Feb  5 16:09:46 2014
    ----------------------------+---------------------------------------------------
    1up in     0 days, 16:34:33 | at                        Mon Feb 10 11:31:49 2014
    t10 in     7 days, 17:04:10 | at                        Mon Feb 17 12:01:26 2014
    no1 in    94 days, 17:10:58 | at                        Thu May 15 13:08:14 2014
        up   424 days, 12:05:30 | since                     Fri Dec  7 11:24:15 2012
      down     4 days, 19:27:32 | since                     Fri Dec  7 11:24:15 2012
       %up               98.879 | since                     Fri Dec  7 11:24:15 2012
    The last time I cleaned out old kernels, there were three to be removed after I determined that it booted into the latest one successfully.
    Pretty sweet! I'll keep this in mind.

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •