在Ubuntu 16.04中关闭daily upgrade & clean
最近发现,系统时区会莫名其妙的变成美国时区,但之前显然已经做了时区变更及时间同步任务,检查日志后发现如下信息:

Jan  3 06:39:19 s1 systemd[1]: Starting Daily apt upgrade and clean activities...
Jan  3 06:39:39 s1 systemd[1]: Started Daily apt upgrade and clean activities.

原来是Ubuntu默认的开启着自动更新,所以需要做关闭:

apt-get remove unattended-upgrades
systemctl kill --kill-who=all apt-daily.service
systemctl stop apt-daily.timer
systemctl disable apt-daily.timer
systemctl stop apt-daily.service
systemctl disable apt-daily.service
systemctl mask apt-daily.service
systemctl daemon-reload

关闭完成后检查结果:

systemctl status apt-daily.timer

注意结果中的:

Active: inactive (dead)

完。