disable updates from command line in Ubuntu 16.04

According to this post

Disable apt-daily.service:

systemctl stop apt-daily.timer
systemctl disable apt-daily.timer
systemctl disable apt-daily.service
systemctl stop apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.service

Or

systemctl disable --now apt-daily{,-upgrade}.{timer,service}

Thanks to suggestions from Norbert and doug I came up with this solution:

sudo sed -i 's/APT::Periodic::Update-Package-Lists "1"/APT::Periodic::Update-Package-Lists "0"/' /etc/apt/apt.conf.d/20auto-upgrades

No, there is no gsetting for this. In 16.04 those relevant options are set in the /etc/apt/apt.conf.d/10periodic file

Obviously the easiest way to alter is thru Software & Updates > Updates which edits that file if you change from default.

You can edit that file manually if desired or fashion some command to set the option(s) to false ("0"

Edit /etc/apt/apt.conf.d/20auto-upgrades to disable automatic updates from the command line:

$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades

Once you have the file opened, switch off the Update-Package-Lists directive from 1 to 0 as shown below:

APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "1";