CLI qubes-vm-update tool adnvantages

According to Qubes 4.3, qubes-vm-update include next flag:

--leave-obsolete Do not remove updater and cache files from target qube

GUI version of Qubes update have no access to toggle that.
In usage case of many templates based on same original OS template with small modification, actual use of “–leave-obsolete” flag save significant amount of network traffic and time.

Anyone can mention downsides for use of “–leave-obsolete” flag? Any security risks?

1 Like

Looking at the code it seems to run apt upgrade with dist_upgrade set to False.

From description:

If the parameter dist_upgrade is True, new dependencies will be
installed as well (and conflicting packages may be removed). The
default value is False.

The equivalent of apt-get dist-upgrade?

--leave-obsolete also prevents removal of obsolete kernels.

In case of dnf if disables obsoletes configuration option.

I think it’s all it does, see yourself if you want to know more:

user@dom0 $ grep -r 'leave_obsolete' /usr/lib/python3.13/site-packages/vmupdate
/usr/lib/python3.13/site-packages/vmupdate/agent/entrypoint.py: remove_obsolete=not args.leave_obsolete
user@dom0 $ grep -r 'remove_obsolete' /usr/lib/python3.13/site-packages/vmupdate
...
1 Like

IMHO, You look at process within update proxy, named disposable sys-firewall by default. We should focus on how it serve update process.
–leave-obsolete flag order update proxy to keep cache and downloaded data between different interactions with separated templates.

You need something like unman’s caching proxy if you want that:

Update-proxy process packages for templates.

According to github docs:

--no-cleanup Do not remove updater and cache files from target qube

outdated flag, actual flag is --leave-obsolete.

What makes you think it’s outdated? I’m pretty sure --no-cleanup removes what it says it should:

Neither of these flags should save network traffic unless you’re upgrading a debian machine or switch between package versions often.

As manual says, caching and removal happen on target qubes. For example, if you run:

$ qubes-vm-update --leave-obsolete --targets template1 template2

Obsolete packages are going to stay on template1 and temlpate2, not update proxy. If you want proxy to cache packages you need either unman’s apt-cacher or its alternative.

1 Like