[PLUG] apt-get update question
Paul Heinlein
heinlein at madboa.com
Fri Aug 27 10:37:01 UTC 2004
On Fri, 27 Aug 2004, Richard C. Steffens wrote:
> Is apt-get update something that needs to be run frequently?
I run 'testing' on my Debian host, so package updates are a way of
life for me :-). I've got a script /etc/cron.daily/aptmaint that runs
every morning. It updates the package index files and then reports on
what packages need upgrading.
#!/bin/sh
#
# nightly cronjob to update package lists and provide a report on
# which packages need updating
#
AG='/usr/bin/apt-get'
if test ! -x "$AG"; then
echo "Can't find executable $AG" > /dev/stderr
exit 1
fi
$AG update >/dev/null 2>&1 && sync && $AG -s upgrade && exit 0
# if we get this far, something's amiss
echo "apt-get operation failed ... somewhere" > /dev/stderr
exit 1
### eof
-- Paul Heinlein <heinlein at madboa.com>
More information about the PLUG
mailing list