1uke_
Posts: 70
Joined: Thu Jul 07, 2016 9:19 pm

How can I get my system to automatically update?

Fri Mar 24, 2017 10:31 pm

Hello,

I am trying to harden the security of my system.

Could anyone help me make my Raspberry Pi running Raspbian automatically update every time I boot it up.

Thanks in advance for your help :)

User avatar
DougieLawson
Posts: 35805
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How can I get my system to automatically update?

Fri Mar 24, 2017 11:10 pm

1uke_ wrote: Could anyone help me make my Raspberry Pi running Raspbian automatically update every time I boot it up.
It's easy to get packages downloaded automatically. It's a very bad idea™ to run auto updates. Consider what happens when you get a broken package down the line - if you're running the apt-get update from the console you may have a chance to fix the damage.
Last edited by DougieLawson on Sat Mar 25, 2017 1:02 pm, edited 1 time in total.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
dividuum
Posts: 165
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: How can I get my system to automatically update?

Sat Mar 25, 2017 11:57 am

1uke_ wrote:I am trying to harden the security of my system.
I think you're looking for unattended-upgrades: https://wiki.debian.org/UnattendedUpgrades

See also http://raspberrypi.stackexchange.com/q/38931 (cron also has the @reboot special string, if you only want to execute something when rebooting). But as DougieLawson said, there's the risk of things going wrong, but I've not seen that happen too often, so it's probably worth it.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

User avatar
TimG
Posts: 288
Joined: Tue Apr 03, 2012 12:15 am
Location: Switzerland

Re: How can I get my system to automatically update?

Tue Mar 28, 2017 1:16 pm

dividuum wrote:
1uke_ wrote:I am trying to harden the security of my system.
I think you're looking for unattended-upgrades: https://wiki.debian.org/UnattendedUpgrades
At first this seemed exactly what I was looking for: automatic updates can be matched against repository labels, and "Raspbian-Security" is given in the list of examples. However it seems that the label "Raspbian-Security" does not exist in the repositories and it's only possible to configure UnattendedUpgrades to install all Raspbian updates.

Is there any way to automatically distinguish (and install) security updates only?

Return to “Advanced users”