Operating System Software and Updates

From Whonix

(Redirected from Upgrade)


End-of-life Software[edit]

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 [archive] 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 bullseye.

Installing Additional Software[edit]

See Install Additional Software Safely.



Ambox warning pn.svg.png All packages must stay up-to-date for security and anonymity purposes.

Frozen Packages[edit]

Info As Whonix ™ is based on the stable Debian distribution, software is normally "frozen" to the stable Debian version [archive] at the point of each major Debian release [archive]. The Debian packages page notes: [1]

This is the latest official release of the Debian distribution. This is stable and well tested software, which changes only if major security or usability fixes are incorporated.

As a distribution, Debian's compilation of software is mostly acquired from "upstream" third parties (the original software vendors). Debian has embraced the principle of software stability which means each major release "freezes" software versions. As a result the stable distribution software is not regularly updated except for critical security fixes. This is called "security support" and only leads to minimal changes across the entire distribution. The intent is to improve stability by reducing the overall number of system changes.

The frozen packages policy means the versions of software installed from Debian package sources will not usually change when a newer release is made available by upstream. [2]

Standard Upgrade vs Release Upgrade[edit]

There are two different types of upgrades.

  • A) Standard Upgrade
  • B) Release Upgrade

This procedure on this wiki page is for standard ("everyday") upgrading of Non-Qubes-Whonix and will not perform a Release Upgrade.

It is recommended to first complete a standard upgrade before applying a release upgrade.

Upgrade vs Image Re-Installation[edit]

The standard ("everyday") upgrade procedure for Non-Qubes-Whonix is more convenient than a complete re-installation of Whonix ™ images because all VM settings and user data are persistent. Backups are possible using VM clones and/or snapshots.

In contrast, a complete re-installation of Whonix ™ images requires Whonix ™ to be completely removed and then re-installed, similar to newcomers installing the platform for the first time. This is "cleaner" and elaborated on the Factory Reset page. Obviously all VM settings and data are lost during this procedure. If this is necessary, follow these steps:

Developers periodically announce a newer Whonix ™ Point Release or major release. To stay informed about releases, see: Following Whonix ™ Developments. It is recommended to subscribe to relevant news channels for this purpose.

Standard upgrades are generally easier, but image re-installation can completely avoid technical issues that might emerge during upgrades.

Standard Upgrade Steps[edit]

1. Save Progress and Backup

On rare occasions [3] the machine might freeze during the upgrade process. In this case any materials already in progress might be lost, for example documents or other drafts that were created. If this is applicable, save the progress before installing operating system updates. If required, backup all user data -- it is ideal to have a copy of the VM(s) so it is possible to try again (if necessary).

2. Update the Package Lists

System package lists should be updated at least once per day [4] with the latest version information for new/updated packages that are available. To update Whonix-Gateway ™ and Whonix-Workstation ™ packages lists, run.

sudo apt-get update

The output should be similar to this.

Hit bullseye/updates Release.gpg                                                                                                    
Hit bullseye/updates Release                                                                                                        
Hit bullseye Release.gpg                           
Hit bullseye Release.gpg
Hit bullseye/updates/main amd64 Packages
Hit bullseye Release                                             
Hit bullseye/updates/contrib amd64 Packages    
Hit bullseye Release                           
Hit bullseye/updates/non-free amd64 Packages  
Hit bullseye/main amd64 Packages               
Hit bullseye/updates/contrib Translation-en  
Hit bullseye/main amd64 Packages                
Hit bullseye/updates/main Translation-en                        
Hit bullseye/contrib amd64 Packages                                
Hit bullseye/updates/non-free Translation-en                    
Hit bullseye/non-free amd64 Packages                               
Ign bullseye/contrib Translation-en              
Ign bullseye/main Translation-en
Ign bullseye/non-free Translation-en
Ign bullseye/main Translation-en_US
Ign bullseye/main Translation-en
Reading package lists... Done

If an error message like this appears.

W: Failed to fetch 404 Not Found

W: Failed to fetch 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

Err bullseye Release.gpg
  Could not resolve ''
Err bullseye Release.gpg
  Could not resolve ''
Err bullseye/updates Release.gpg
  Could not resolve ''
Reading package lists... Done
W: Failed to fetch  Could not resolve ''

W: Failed to fetch  Could not resolve ''

W: Failed to fetch  Could not resolve ''

W: Some index files failed to download. They have been ignored, or old ones used instead.

Or this.

500  Unable to connect

Then something went wrong. It could be a temporary Tor exit relay or server failure that should resolve itself. Check if the network connection is functional by changing the Tor circuit and trying again. Running systemcheck might also help to diagnose the problem.

Sometimes a message like this will appear.

Could not resolve ''

It that case, it helps to run.


And then try again.

3. Upgrade

To install the newest versions of the current packages installed on the system, run.

sudo apt-get dist-upgrade

Please note that if the Whonix APT Repository was disabled (see Disable Whonix APT Repository), then manual checks are required for new Whonix releases and manual installation from source code.

4. Never Install Unsigned Packages!

If a message like this appears.

WARNING: The following packages cannot be authenticated!
Install these packages without verification [y/N]?

Then do not proceed! Press N and <enter>. Running apt-get update again should fix the problem. If not, something is broken or it might be a man-in-the-middle attack, which is not that unlikely because updates are retrieved via Tor exit relays and some are malicious. Changing the Tor circuit is recommended if this message appears.

5. Signature Verification Warnings

No signature verification warnings should appear. If it does occur, it will look like this.

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: stable Release: The following signatures were invalid: KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681

Caution is warranted even though apt-get 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 for this occurrence. Either there is a problem with the repository that is unfixed by contributors or a man-in-the-middle attack has taken place. [5] The latter is not a big issue, since no malicious packages are installed. It may also 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 see how the documentation looked at that point, please click on Expand on the right.

For instance, the Tor Project's apt repository key had expired [archive] 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: stable Release: The following signatures were invalid: KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681

W: Failed to fetch  

W: Some index files failed to download. They have been ignored, or old ones used instead.

This issue was quickly reported [archive]. There was no immediate danger and the message could be safely ignored. As a reminder, never install unsigned packages as explained above.

For a more recent example, see the Whonix apt repository keyexpired error.

Please report any other signature verification errors if/when they appear, even though this is fairly rare.

6. Changed Configuration Files [ link]

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

First learn how to determine if the file comes from a Whonix ™ package or other distribution like Debian. This is the list of Whonix ™-specific package name prefixes:

  • whonix-...; or
  • anon-...; or
  • kicksecure-....

The list of Whonix ™ packages is also found on Whonix ™ GitHub [archive] or Whonix ™ GitLab [archive]; a search function is available.

Another option is the apt-cache show command. For example to discover if the sdwdate package is coming from Whonix ™ or elsewhere, run.

apt-cache show sdwdate

This should show (bold added): [6]


If the package:

  • Does not come from Whonix ™: Press n as previously advised, otherwise settings affecting anonymity, privacy and security might be lost. This applies to the example above stating "Setting up ifupdown ...". Advanced users who know better could manually check the differences and merge them.
  • Comes from Whonix ™: It is safest to press y, but any customized settings will be lost (these can be re-added afterwards). Conflicts like these should be rare if modular flexible .d style configuration folders are used.

See also:

7. Restart Services After Upgrading

To restart services after upgrading, either reboot.

sudo reboot

Or use the (harder) needrestart method to avoid rebooting. For readers interested in the needrestart method, please click on Expand on the right side.

Perform this step once. Install needrestart.

sudo apt-get update
sudo apt-get install needrestart

Run needrestart.

sudo needrestart

The program will provide advice. Run it again after applying the advice.

sudo needrestart

If nothing else needs to be restarted, it should show.

No services need to be restarted.

This feature might become more usable and automated in the future. (T324 [archive])

8. Restart After Kernel Upgrades

When linux-image-... is upgraded, a reboot is required for any security updates to be in effect.

apt-get Hash Sum Mismatch[edit]

A hash sum mismatch can look like this.

W: Failed to fetch  Hash Sum mismatch

This might occur due to Tor and/or network unreliability issues. If this warning message is transient, it can be safely ignored. Otherwise, try one of the fixes below.

  1. Change the Tor circuit and/or try again later.
  2. If the warning message still persists, deleting the package lists should solve it. [7]

To delete the package lists, run:

sudo rm -rf /var/lib/apt/lists/*

To check everything is functional, update the package lists and then upgrade the distribution. It is likely that previous update/upgrade attempts failed due to the mismatch.

sudo apt-get update && sudo apt-get dist-upgrade

Windows logo - 2012.svg.png Windows 10, Virtualbox logo.png VirtualBox users only: refer to the Hash Sum mismatch? [archive] forum thread.

Non-functional Onion Services[edit]

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-get update
Hit:1 bullseye/updates InRelease
Hit:2 tor+http://deb.dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion bullseye InRelease
Ign:3 bullseye InRelease
Hit:4 bullseye InRelease
Hit:5 bullseye Release
Err:7 tor+http://sgvtcaew4bxjd7ln.onion bullseye/updates InRelease
SOCKS proxy socks5h://localhost:9050 could not connect to sgvtcaew4bxjd7ln.onion ( due to: Host unreachable (6)
Err:8 tor+http://vwakviie2ienjx6t.onion/debian bullseye InRelease
SOCKS proxy socks5h://localhost:9050 could not connect to vwakviie2ienjx6t.onion ( due to: Host unreachable (6)
Reading package lists… Done
W: Failed to fetch tor+http://sgvtcaew4bxjd7ln.onion/dists/bullseye/updates/InRelease SOCKS proxy socks5h://localhost:9050 could not connect to sgvtcaew4bxjd7ln.onion ( due to: Host unreachable (6)
W: Failed to fetch tor+http://vwakviie2ienjx6t.onion/debian/dists/bullseye/InRelease SOCKS proxy socks5h://localhost:9050 could not connect to vwakviie2ienjx6t.onion ( 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. [8] [9]

1. Open Debian sources.list in an editor.

Open file /etc/apt/sources.list.d/debian.list in an editor with root rights.

(Qubes-Whonix ™: In TemplateVM)

This box uses sudoedit for better security [archive]. 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.

sudoedit /etc/apt/sources.list.d/debian.list

2. Comment (#) the .onion address lines and uncomment the clearnet address lines.

The first two code blocks should look like this; only these blocks require editing.

#deb tor+http://sgvtcaew4bxjd7ln.onion bullseye/updates main contrib non-free
deb tor+ bullseye/updates main contrib non-free

#deb tor+http://vwakviie2ienjx6t.onion/debian bullseye main contrib non-free
deb tor+ bullseye main contrib non-free

Save and exit.

3. Confirm the clearnet repositories are functional.

sudo apt-get 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[edit]

See How-to: Install or Update with Utmost Caution.

GUI Applications with Root Rights[edit]

Moved to Safely Use Root Commands: Graphical Applications with Root Rights.

See Also[edit]


  1. [archive]
  2. [archive]
  3. [archive]
  4. In Whonix and on the host.
  5. Rollback or indefinite freeze attacks as defined by The Update Framework (TUF) - Threat Model - Attacks and Weaknesses - [archive] - [archive].
  6. Will be changed to GitLab.
  7. [archive]
  8. If similar issues occur with Whonix or Qubes onion services then follow the same procedure and modify the derivative.list and qubes-r4.list files, respectively.
  9. [archive]

Fosshost is sponsors Kicksecure ™ stage server Whonix old logo.png
Fosshost About Advertisements

Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki

Follow: 1024px-Telegram 2019 Logo.svg.png Iconfinder Apple Mail 2697658.png Twitter.png Facebook.png Rss.png Reddit.jpg 200px-Mastodon Logotype (Simple).svg.png

Support: 1024px-Telegram 2019 Logo.svg.png Discourse logo.png Matrix logo.svg.png

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contriute

Whonix donate bitcoin.png Monero donate Whonix.png United Federation of Planets 1000px.png

Twitter-share-button.png Facebook-share-button.png Telegram-share.png link=mailto:?subject=Operating System Software and Updates&body= link= System Software and Updates link= System Software and Updates link= System Software and Updates%20 System Software and Updates

Did you know that Whonix ™ could provide protection against backdoors? See Verifiable Builds. Help is wanted and welcomed.

https link onion link Priority Support | Investors | Professional Support

Whonix | © ENCRYPTED SUPPORT LP | Heckert gnu.big.png Freedom Software / Osi standard logo 0.png Open Source (Why?)

The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent.