Does Raspberry Pi working with Raspbian make any automatic updates without our permission? If yes, How to disable it?

  • The way you phrased it makes it sound like Rasbpian is doing something bad. – Dmitry Grigoryev Sep 10 '19 at 6:47
  • This is not intended, but it should not do this. – Jawad Sabir Sep 10 '19 at 7:03

In fact Raspbian does have daily upgrades enabled by default; to check:

systemctl status apt-daily-upgrade.timer

The bit to play attention to is in the second line of output. Between the two semi-colons it will say enabled:

 Loaded: loaded (/lib/systemd/system/apt-daily-upgrade.timer; disabled; vendor preset: enabled)

Or disabled, as it does here. Whether it does anything or not, you can check the time it was last run with:

stat -c %z /var/lib/apt/daily-lock

If it does do something, there should be a record of that in /var/log/dpkg.log.

To disable this:

sudo systemctl mask apt-daily-upgrade
sudo systemctl mask apt-daily
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable apt-daily.timer

The reason for using mask is to prevent these from being re-enabled by some dependency.

Notice those are two separate services; they both run /usr/lib/apt/apt.systemd.daily, a shell script, with parameters install and update.

| improve this answer | |
  • 1
    @Dougie, it's a sane default for an IoT device such as raspberry pi, one surelly wants to receive unnatended secrutiy patches to stay safe. And if you for whatever reason do not, well, it's easy to disable, nothing idiotic about that. – Andrew Savinykh Sep 10 '19 at 4:28
  • My system shows Active: inactive (dead) since Sun 2019-12-29 06:58:54 AEDT; 5h 51min ago but there is NO evidence that it has ever updated my OS. On another Pi (which I last manually updated over a month ago) now shows 17 packages can be upgraded. so while this service runs it doesn't seem to actually do anything. – Milliways Dec 29 '19 at 1:56
  • @Milliways The line to check is the second one, Loaded:. The Active line will always be more or less the same unless you happen to check while the update/whatever is actually in progress, since this is not a persistent service. I've edited in a bit about this. – goldilocks Dec 30 '19 at 15:43

It does have that feature available, but it is not enabled by default.


| improve this answer | |
  • 1
    You might want to check systemctl status apt-daily-upgrade... ;| – goldilocks Sep 9 '19 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.