Update Qubes-Whonix ™
It is inadvisable to run software that has reached end-of-life status. Developers do not fix existing defects, bugs or vulnerabilities in this case, leading to serious security risks.
For example, in 2018 VLC Media Player in Debian
jessie had reached end-of-life status in May of that year. In that case, Whonix ™ users who did not utilize a different media player were at risk, because VLC in Debian
jessie has unpatched security vulnerabilities. This VLC vulnerability does not apply to the current stable Whonix ™ 16 release which is based on Debian
Installing Additional Software
See Install Software.
Standard Update vs Release Upgrade
This procedure is for normal ("everyday") updates of Qubes-Whonix ™ and will not perform a Release Upgrade.
Before applying a release upgrade, it is recommended to first complete a standard update in both the
whonix-ws-16 Templates, via
Qubes App Menu(blue/grey "Q")→
Qubes App Menu(blue/grey "Q")→
Afterward, perform the Standard Update Steps below in both terminals.
- At least once a day, Qubes users should update the system package lists in all Templates, Standalones and
dom0with the latest version information on new and updated packages that are available for download. 
- Below are some warnings and issues which are general Qubes bugs and unspecific to Qubes-Whonix ™. Primary sources from Qubes OS are referenced as links with specific citations.
Quote Qubes OS "How to update" warning:
Warning: Updating exclusively with direct commands such as
dnf update, and
apt updateis not recommended, since these bypass built-in Qubes OS update security measures. Instead, we strongly recommend first using the Qubes Update tool or its command-line equivalents, as described below, then using the direct commands for confirmation (see #6585 and PR #79). (By contrast, installing packages using direct package manager commands is fine.)
- Qubes Update tool
- For updating using command-line, refer to Qubes OS "How to update":
The situation is however complicated due to Qubes Updater Issues, most notably such as:
- qubes-dom0-update shows
No updates availablein case of network is down /
qubes-dom0-updatefails to notice if repositories are unreachable / network is down,
- Updating via Salt falsely claims to succeed when it actually fails and
- Replace built-in Qube Manager update functionality with the Qubes Update tool.
Standard Update Steps
Note: Updating Tor Browser is a separate issue; see Update Tor Browser.
1. Update the Package Lists
At the time of writing, it is discouraged to update
whonix-ws-16 Template packages lists using Qube Manager (
Qube Manager →
left-click whonix-gw-16 or whonix-ws-16 →
Update qube system (blue arrow)). 
For similar reasons, it is also discouraged to open a terminal in the Template and run.
sudo apt update
The output should look similar to this.
Hit:1 https://deb.qubes-os.org/r4.0/vm bullseye InRelease Hit:2 tor+https://deb.debian.org/debian bullseye InRelease Hit:3 tor+https://deb.whonix.org bullseye bullseye Hit:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Hit:5 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Hit:6 tor+https://deb.debian.org/debian-security bullseye-security InRelease Hit:7 tor+https://deb.debian.org/debian bullseye-backports InRelease Reading package lists... Done
If an error message like this appears. 
Hit:1 https://deb.qubes-os.org/r4.0/vm bullseye InRelease Ign:2 tor+https://deb.debian.org/debian bullseye InRelease ... Err:12 tor+http://5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion/ bullseye/updates Release Connection failed Reading package lists... Done E: The repository 'tor+http://5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion/ bullseye/updates Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Done.
500 Unable to connect
Then something went wrong. It could be:
- A temporary Tor exit relay or server failure that should resolve itself; or
- One or more Onion Services might be non-functional.
In the first case, check if the network connection is functional by changing the Tor circuit and/or run systemcheck to try and diagnose the problem. In the second case, try setting clearnet repository links before attempting to update again.
Sometimes a message like this will appear.
Could not resolve 'security.debian.org'
It that case, it helps to run.
And then try again.
If using a terminal, run the following command to install the latest system package versions. 
sudo apt full-upgrade
Please note if the Whonix ™ APT Repository was disabled (see Disable Whonix ™ APT Repository), then manual checks are required for new Whonix ™ releases along with manual installation from source code.
3. Never Install Unsigned Packages!
If a message like this appears.
WARNING: The following packages cannot be authenticated! thunderbird Install these packages without verification [y/N]?
Then do not proceed! Press N and <enter>. Running apt update again should fix the problem. If not, something is broken or it is a Man-in-the-Middle Attack, which is not that unlikely since updates are retrieved over Tor exit relays and some of them are malicious. Changing the Tor circuit is recommended if this message appears.
4. Signature Verification Warnings
There should be no signature verification warnings at present; if it occurs, it will look similar to this.
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.torproject.org stable Release: The following signatures were invalid: KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681
Caution is required in this case, even though
apt will automatically ignore repositories with expired keys or signatures, and no upgrades will be received from that repository. Unless the issue is already known or documented, it should be reported for further investigation.
There are two possible reasons why this could happen. Either there is an issue with the repository that the contributors have yet to fix or the user is the victim of a Man-in-the-Middle Attack.  The latter is not a big issue, since no malicious packages are installed. Further, it may automatically resolve itself after a period of time when a different, non-malicious Tor exit relay is used, or following a manual change of the Tor circuit.
In the past, various apt repositories were signed with an expired key. To inspect how the documentation appeared at that point, please click on Expand on the right.
For instance, the Tor Project's apt repository key had expired and the following warning appeared.
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.torproject.org stable Release: The following signatures were invalid: KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 W: Failed to fetch https://deb.torproject.org/torproject.org/dists/stable/Release W: Some index files failed to download. They have been ignored, or old ones used instead.
This issue had already been reported. There was no immediate danger and it could have safely been ignored. Just make sure to never install unsigned packages as explained above.
For another example, see the more recent Whonix apt repository keyexpired error.
Although an unlikely outcome, please report any other signature verification errors if/when they appear.
5. Changed Configuration Files
Be careful if a message like this appears.
Setting up ifupdown ... Configuration file `/etc/network/interfaces' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package contributor's version N or O : keep your currently-installed version D : show the differences between the versions Z : background this process to examine the situation The default action is to keep your current version. *** interfaces (Y/I/N/O/D/Z) [default=N] ? N
It is safest to press
y, but any customized settings will be lost (these can be re-added afterwards).  
6. Shutdown the Template
Shutdown the Template from Qube Manager:
Qube Manager →
right-click on Template →
Shutdown VM or via the contextual menu.
7. Restart/Update Whonix ™ VMs
If new updates were available and installed, it is necessary to either:
- Restart any running Whonix-Gateway ™ ProxyVMs (
sys-whonix) or Whonix-Workstation ™ App Qube instances (
anon-whonix) so they are updated; or
- Apply the same update process in any running VMs if an immediate restart is inconvenient.
Note: If any
dom0 packages were upgraded during Qubes system updates, reboot the computer to profit from any security updates.
Non-functional Onion Services
Sometimes the Debian, Whonix ™ or Qubes onion servers are non-functional. This means updates cannot be completed automatically and an error message similar to below will appear.
user@host:~$ sudo apt update Hit:1 https://deb.debian.org/debian-security bullseye-security InRelease Hit:2 tor+http://deb.dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion bullseye InRelease Ign:3 https://deb.debian.org/debian bullseye InRelease Hit:4 https://deb.whonix.org bullseye InRelease Hit:5 https://deb.debian.org/debian bullseye Release Err:7 tor+http://5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion bullseye/updates InRelease SOCKS proxy socks5h://localhost:9050 could not connect to 5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion (0.0.0.0:0) due to: Host unreachable (6) Err:8 tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian bullseye InRelease SOCKS proxy socks5h://localhost:9050 could not connect to 2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion (0.0.0.0:0) due to: Host unreachable (6) Reading package lists… Done W: Failed to fetch tor+http://5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion/dists/bullseye/updates/InRelease SOCKS proxy socks5h://localhost:9050 could not connect to 5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion (0.0.0.0:0) due to: Host unreachable (6) W: Failed to fetch tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian/dists/bullseye/InRelease SOCKS proxy socks5h://localhost:9050 could not connect to 2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion (0.0.0.0:0) due to: Host unreachable (6) W: Some index files failed to download. They have been ignored, or old ones used instead.
Until the onion service is re-established, complete the following steps in Whonix-Gateway ™ (
whonix-gw-16) and Whonix-Workstation ™ (
whonix-ws-16) to circumvent the issue.  
1. Open Debian sources.list in an editor.
/etc/apt/sources.list.d/debian.list in an editor with root rights.
(Qubes-Whonix ™: In Template)
This box uses
sudoedit for better security. This is an example and other tools could also achieve the same goal. If this example does not work for you or if you are not using Whonix ™, please refer to this link.
2. Comment (#) the .onion address lines and uncomment the clearnet address lines.
The code blocks should look like this; only these entries require editing. 
deb tor+https://deb.debian.org/debian bullseye main contrib non-free deb tor+https://deb.debian.org/debian bullseye-updates main contrib non-free deb tor+https://deb.debian.org/debian-security bullseye-security main contrib non-free deb tor+https://deb.debian.org/debian bullseye-backports main contrib non-free deb tor+https://fasttrack.debian.net/debian bullseye-fasttrack main contrib non-free #deb tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian bullseye main contrib non-free #deb tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian bullseye-updates main contrib non-free #deb tor+http://5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion/debian-security bullseye-security main contrib non-free #deb tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian bullseye-backports main contrib non-free
Save and exit.
3. Confirm the clearnet repositories are functional.
sudo apt update
4. Optional: Revert and update the package lists.
Consider reverting these changes later on because onion repositories have various security advantages. Afterwards, apply Updates to refresh the package lists.
Updating with Extra Care
See How-to: Install or Update with Utmost Caution .
- ↑ See: How to update.
Quote Andrew David Wong, Community Manager, @QubesOS. CCO, Invisible Things Lab:
3. Selecting a VM in the Qube Manager and pressing the "Update" button. [...]. (3) is a weird in-between method that is inferior to (2). For example, historically, not all of the Salt fixes applied by (2) have been applied by (3), which is a security problem.
- ↑ https://forums.whonix.org/t/cant-update-any-whonixvm-in-qubes-4-0-or-whonixcheck/6023
- ↑ Steps 1 and 2 can be combined with:
- ↑ Rollback or indefinite freeze attacks as defined by The Update Framework (TUF) - Threat Model - Attacks and Weaknesses - https://theupdateframework.io/security/ -.
- ↑ Or Whonix ™ changes can be delayed, inspected, and then backported if the effort is worth it.
Whonix ™ uses package
config-package-devwhich assumes ownership of configuration files coming from “other distributions” (mostly Debian, although third party repositories might be added by users). (Whonix ™ on
- ↑ If similar issues occur with Whonix ™ or Qubes onion services then follow the same procedure and modify the
- ↑ https://forums.whonix.org/t/errors-updating-september-2018/6028
- ↑ There is no Debian onion for fasttrack yet.