About diabling auto-update

Hello,

If I want disabling auto-update in Ubuntu18.04, I can modify following code.

======== /etc/apt/apt.conf.d/20auto-upgrades =================
APT::Periodic::Update-Package-Lists “1”;
APT::Periodic::Unattended-Upgrade “1”;

here, 1 ==> 0

But, I cannot find this file on Jetson Nano Ubuntu(L4T)

What am I supposed to do?

Thank you.

The directory “/etc/apt/apt.conf.d/” is actually an “override” of any configuration files of the same name within the default of the system. The system default would not be edited from any “regular” system location, e.g., the file will normally exist at somewhere such as “/usr/share/unattended-upgrades/” (file “/usr/share/unattended-upgrades/20auto-upgrades”), but instead of editing the original, you would copy the default 20auto-upgrades to “/etc/apt/apt.conf.d/”, and then edit that copy. The missing file is just an indication your system is using defaults.

Or, you could just use an editor and create the file of that name with the correct content directly in place since it is simple.

1 Like

Hello,

Thank you for always explaining kindly.
If there is no file, the auto update is turned on (default), so you can create a new file and insert it?

Do you know how to check if auto update is turned off?

Thank you.

Hello,

I found this : https://linuxconfig.org/disable-automatic-updates-on-ubuntu-18-04-bionic-beaver-linux

Can the name of the file that manages auto update on Ubuntu (L4T) differ from normal Ubuntu and Jetson Nano?

As you can see in the picture, it looks like we found a flag that turns off auto update with the grep command. Can I edit this file?

Thank you.

…the above is the exact approach most developers use. There will be some default file elsewhere in the operating system. If you find 10periodic somewhere else, or 20auto-upgrades, and you wish to edit that content, then simply copy it to /etc/apt/apt.conf.d/, and then edit there. Removing that file (or just disabling it by compressing it) will revert back to the original behavior. Putting the edited file back in place will produce the modified behavior.

You could also just create the file as you want. I don’t know how to test if this is set, but for example I have:
/etc/apt/apt.conf.d/20aut-upgrades
…and the content of that file is:

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

Thus my system will update the package list, but won’t actually upgrade anything. I get to see a message about how many packages need update, but I pick which packages to upgrade, and when to do so. I suggest just put the file in place and see if it works how you want.

1 Like

Hello,

Looking at the content of 10periodic
It shows a list of updates, but you mean that you don’t actually upgrade?

Thank you.

I upgrade, but I do so manually. I do not want this to run on boot-up. I want this to run when I choose. Probably the time this matters most is right after a new flash…there might be 500 packages to upgrade, and meanwhile, you are trying to do first boot login setup. I always set this up in the “Linux_for_Tegra/rootfs/etc/apt/” area before I ever flash.

1 Like