Skip to content

Exsi

Ubuntu

Prevent auto updating process in image https://gist.github.com/Voronenko/8af5c91c2380787993d2a2cf58ad1187

#!/bin/bash

systemctl stop apt-daily.service
systemctl kill --kill-who=all apt-daily.service

# wait until `apt-get updated` has been killed
while ! (systemctl list-units --all apt-daily.service | fgrep -q dead)
do
  sleep 1;
done

# systemctl mask apt-daily.service apt-daily-upgrade.service