Skip to content

ClockworkNet/kernel_cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badge: Supported by Clockwork

kernel_cleanup

Evaluate installed Linux kernel packages (linux-headers, linux-image, linux-image-extra) and purge any that are not the current version or the newest version.

Cron Example

dpkg expects a more robust path:

PATH=/usr/sbin:/usr/bin:/sbin:/bin
@daily /usr/local/sbin/kernel_cleanup.py -q

Compatibility

badge: Travis CI master branch status

Tested on:

  • Ubuntu 10.04 LTS (Lucid Lynx)
  • Ubuntu 12.04 LTS (Precise Pangolin)
  • Ubuntu 14.04 LTS (Trusty Tahr)
  • Ubuntu 16.04 LTS (Xenial Xerus)

Testing Quick Start

  1. Change directory into repository (into same directory as where this README resides).

  2. Install virtual environment:

    mkvirtualenv --system-site-packages -a $(pwd) -r tests/requirements.txt \
        kernel_cleanup_test
    
    1. If installing requirements errors, update pip:

      pip install --upgrade pip
      
    2. Install requirements:

      pip install -r tests/requirements.txt
      
  3. Run pytest:

    py.test
    

To test against alternate Python versions, it may be useful to create virtual environments with an interpreter other than the one with which virtualenv was installed, e.g. for non-default python3:

mkvirtualenv --system-site-packages -a $(pwd) -p $(which python3) \
    -r tests/requirements.txt kernel_cleanup_test3

License

badge: GitHub license (MIT)

About

Evaluate installed Linux kernel packages and purge any that are not the current version or the newest version.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages