-
-
Save GeoffClements/e334fcde45fd440a576642345b61f13b to your computer and use it in GitHub Desktop.
Monthly cleanup CRON task, place in /etc/cron.monthly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Tidy cron script | |
# | |
# This script attempts to tidy up by | |
# 1. Updating linux-purge and then running it | |
# 2. Autoremove uninstalled packages | |
# 3. Clearing out old apt packages | |
UDLP=/usr/bin/update-linux-purge | |
LP=/usr/bin/linux-purge | |
APT=/usr/sbin/apt | |
test -x ${UDLP} && nice -n 19 ${UDLP} && nice -n 19 ${LP} -k 0 -y | |
nice -n 19 ${APT} -y autoremove | |
nice -n 19 ${APT} clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment