Results 1 to 4 of 4

Thread: Clean Up /boot 16.4.1

  1. #1
    Join Date
    Sep 2008
    Location
    New Jersey
    Beans
    23
    Distro
    Ubuntu 14.04 Trusty Tahr

    Clean Up /boot 16.4.1

    I just upgraded to 16.04.1. WOuld like to know if the following still applies to cleaning up /boot.

    START CLEAN UP
    sudo apt-get autoremove

    CLEAN /BOOT (without the double quotes at the beginning and end)
    "dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge"


    Thanks,
    Rich Ramik

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,593
    Distro
    Ubuntu

    Re: Clean Up /boot 16.4.1

    Sure, that'll work.
    But an even easier thing is to install byobu
    Code:
    sudo apt install byobu
    then you can run the purge-old-kernels command
    Code:
    sudo purge-old-kernels
    which by default keeps two kernels, instead of only one, like the dpkg command does.
    But it can remove all (except the running kernel, of course) or even keep ten kernels if you want, as it has a parameter (and a man page) for that.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Clean Up /boot 16.4.1

    In Xenial, I believe it is no longer necessary to install byobu or any package to purge old kernels (though byobu is a great app for many other reasons and its kernel purging script is a handy extra tool). However, one needs to use the new apt command instead of apt-get as follows:
    Code:
    sudo apt autoremove --purge
    …this will keep just the two latest kernels and purge the rest.

  4. #4
    Join Date
    Sep 2008
    Location
    New Jersey
    Beans
    23
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Clean Up /boot 16.4.1

    Hey, thanks for the info.

    Rich Ramik

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
  •