On Sun, 30 May 2021 13:08:18 +0200
Stella Ashburne <rewe...@gmx.com> wrote:

> My knowledge of computing, Linux and Debian is elementary and hence I
> won't know how to set up a cron-apt or use apticron.
> 
> Question: Is it a prerequisite (pre-condition) that to set up a cron
> job to download updates at a fixed time every day, the OS must have
> the installed package "unattended-upgrades"?

No, unattended upgrades is not a requirement.

I used the following cron job for years until recently. I started using
something like it when I was on dial-up and wanted to speed up the
upgrade process by having the new packages already on my computers.
Over the past year or so I have phased in unattended-upgrades.

5      3      *                *        *       root    /usr/bin/apt-get update 
> /dev/null && /usr/bin/apt-get -dy dist-upgrade > /dev/null

(That is all one line. I expect your mail reader will wrap it horribly.
When you copy and paste it, straighten it out into all one line.)

I suggest that, as root, you put it in its own unique file
in /etc/cron.d. That way it will survive updates to other files.

A brief explanation of what it does:

At 03:05 every morning, as root, run apt-get update to update
apt-get's cache. If that's successful (the &&), run apt-get dist-upgrade
for downloads only (-d) and assume a "yes" answer to all questions
(-y). In both cases, discard the standard output by sending it to the
null device.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Reply via email to