Actions

Uninstall Qubes-Whonix

< Qubes

Introduction[edit]

This procedure is useful before a complete re-installation of Qubes-Whonix. [1]

Alternatively, it is possible to Reinstall Qubes-Whonix TemplateVMs without a complete uninstallation of Whonix as documented on this page.

Before Qubes-Whonix TemplateVM packages can be uninstalled, the TemplateVM must not be used as the underlying template by any VMs. Otherwise Qubes prohibits removal. Therefore, choose either to delete the VMs as documented below, or follow the step to: Stop using Whonix TemplateVMs in VM Template Settings.

Remove Whonix-Workstation TemplateBasedAppVMs[edit]

The anon-whonix Whonix-Workstation TemplateBasedAppVM [2] must be manually removed. Alternatively, you can Stop using Whonix TemplateVMs in VM Template Settings.

In the case of previously used anon-whonix, strongly consider backups of any important files before proceeding.

1. Remove anon-whonix.

Qube Manager -> right-click Whonix TemplateBasedAppVM anon-whonix -> Delete qube [3]

2. Repeat the above step for any other TemplateBasedAppVMs based on Whonix-Workstation TemplateVM whonix-ws-14 that you might have created earlier. Replace vm-name with the actual name of the VM.

Qube Manager -> right-click Whonix TemplateBasedAppVM vm-name -> Delete qube [4]

Remove the Whonix-Workstation DVM Template[edit]

The whonix-ws-14-dvm domain must be manually removed. Alternatively, you can Stop using Whonix TemplateVMs in VM Template Settings.

In the case of customized Whonix-Workstation DVM template, strongly consider backups of any important files before proceeding.

To launch a dom0 terminal, click the Qubes App Launcher (blue/grey "Q") and then open the Terminal Emulator (Xfce Terminal).

Qubes-whonix1.png

1. Set the default DispVM for anon-whonix to "". This is only required if you chose to skip removal of anon-whonix as documented above.

qvm-prefs anon-whonix default_dispvm ""

2. Repeat the above step for all other TemplateBasedAppVMs that are based on Whonix-Workstation TemplateVM whonix-ws-14 that you might have created earlier. Replace vm-name with the actual name of the VM.

qvm-prefs vm-name default_dispvm ""

3. Set the default DispVM for whonix-ws-14-dvm to "".

qvm-prefs whonix-ws-14-dvm default_dispvm ""

4. Remove whonix-ws-14-dvm.

qvm-remove whonix-ws-14-dvm

5. The process of removing whonix-ws-14-dvm is now complete.

Stop using Whonix-Gateway as Qubes UpdateVM[edit]

Set Qubes dom0 UpdateVM to sys-firewall or any VM of your choice.

Note: Upgrades will be no longer torified.

This is only required if you previously elected to update dom0 through Whonix. In any case it is a good idea to check the Qubes dom0 UpdateVM setting.

Qubes Manager -> System -> Global Settings -> Dom0 UpdateVM: sys-firewall -> OK [5]

Stop using Whonix-Gateway as NetVM for any VM[edit]

If you configured any VM to use sys-whonix as NetVM, this change needs to be undone.

Note: The VM's traffic will be no longer torified.

This is only required if you previously elected to torify a VMs network traffic through Whonix. In any case it is a good idea to check the NetVM setting of Qubes VMs.

To set the NetVM of any VM to None, in other words, to disable networking.

Qube Manager -> right-click vm-name -> Qube settings -> NetVM -> None -> OK [6]

Alternatively, you can set the NetVM to sys-firewall or another ProxyVM of your choice. However, traffic will not be torified (unless you are using cloned VMs).

Remove Whonix-Gateway TemplateBasedProxyVMs[edit]

The sys-whonix Whonix-Gateway TemplateBasedProxyVM [2] must be manually removed. Alternatively, you could Stop using Whonix TemplateVMs in VM Template Settings.

In the case of a previously used sys-whonix ProxyVM, consider backups before proceeding. This might be a custom Tor configuration, Onion Services configuration, Bridges configuration or Tor data to persist Tor Entry Guards.

1. Remove sys-whonix.

Qube Manager -> right-click sys-whonix -> Delete qube [7]

2. Repeat the above step for any other TemplateBasedProxyVM based on Whonix-Gateway TemplateVM whonix-gw-14 that might have been created earlier. Replace vm-name with the actual name of the VM.

Qube Manager -> right-click vm-name -> Delete qube [8]

Stop using Whonix TemplateVMs in VM Template Settings[edit]

If a Whonix TemplateVM is set as the underlying TemplateVM for any VMs, the TemplateVM cannot be removed. Therefore, choose either to delete the VM as documented above or unset the TemplateVM using Qube Manager. [9]

Optionally, the VMs can be set to use a dummy template. The advantage of setting a dummy template as the underlying TemplateVM is the ability to retain any VMs along with the user storage contents.

1. Create the dummy TemplateVM. [10]

To launch a dom0 terminal, click the Qubes App Launcher (blue/grey "Q") and then open the Terminal Emulator (Xfce Terminal).

Qubes-whonix1.png

Execute the following commands.

Qubes R3.2:

mkdir -p /var/lib/qubes/vm-templates/dummy
touch /var/lib/qubes/vm-templates/dummy/{root.img,private.img}
qvm-add-template dummy

Qubes R4:

qvm-create --class TemplateVM --label red dummy

The process of creating the dummy TemplateVM is now complete.

2. Shut down the Whonix TemplateVM if already running: Qube Manager -> right-click Whonix TemplateVM -> Shutdown qube [11]
3. Set the dummy template as the TemplateVM: right-click VM -> Qube settings -> Template: dummy [12]

The process of setting the dummy template as the VMs underlying TemplateVM is now complete.

Stop using Whonix-Gateway for torified TemplateVM Updates[edit]

In case you intent to:

  • B) Not install Qubes-Whonix again: Apply the following steps

In technical terms, stop using Whonix-Gateway as dom0 UpdatesProxy for any TemplateVMs. This is only required if you previously elected to update Qubes TemplateVMs through Whonix.

1. Open /etc/qubes-rpc/policy/qubes.UpdatesProxy with root rights.

2. Search for.

$type:TemplateVM $default allow,target=sys-whonix

3. Comment out that line. i.e. add a hash (#) in front of it.

#$type:TemplateVM $default allow,target=sys-whonix

[13]

4. Save.

5. The steps to remove Whonix-Gateway as dom0 UpdatesProxy is now complete.

Uninstall Whonix TemplateVMs[edit]

Introduction[edit]


In the case of customized TemplateVMs, you should strongly consider backups of anything important before proceeding.


Whonix-Gateway[edit]

  1. Open a dom0 terminal: Qubes App Launcher (blue/grey "Q") -> System Tools -> Xfce Terminal
  2. Uninstall all Qubes-Whonix-Gateway template packages matching qubes-template-whonix-gw*: [14]

sudo dnf remove qubes-template-whonix-gw*

Review the dnf confirmation output before proceeding.

Whonix-Workstation[edit]

  1. Open a dom0 terminal: Qubes App Launcher (blue/grey "Q") -> System Tools -> Xfce Terminal
  2. Uninstall all Qubes-Whonix-Workstation template packages matching qubes-template-whonix-ws*: [14]

sudo dnf remove qubes-template-whonix-ws*

Review the dnf confirmation output before proceeding.

All Whonix Template Packages[edit]

  1. Open a dom0 terminal: Qubes App Launcher (blue/grey "Q") -> System Tools -> Xfce Terminal
  2. Uninstall all Qubes-Whonix template packages matching qubes-template-whonix*: [14]

sudo dnf remove qubes-template-whonix*

Review the dnf confirmation output before proceeding.

Troubleshooting[edit]

If you receive the following error when removing the TemplatesVMs a manual fix is required.

“ERROR: VM installed by package manager: template-vm-name”

For instruction on how to work around this issue see: Remove VM Manually.

Done[edit]

The process of uninstallation of Whonix is now complete.

Optional: If the user wishes to use Whonix again at some point in future the user is free to Install Qubes-Whonix.

Footnotes[edit]

  1. Or if deciding not to use Whonix at all.
  2. 2.0 2.1 Qubes glossary documents TemplateBasedVM, TemplateBasedVMs and TemplateBasedHVM. So the spelling of TemplateBasedAppVMs and TemplateBasedProxyVMs should be correct.
  3. qvm-remove anon-whonix
  4. qvm-remove vm-name
  5. To revert this change, run.
    qubes-prefs updatevm sys-firewall
  6. qubes-prefs --set vm-name netvm ""
  7. qvm-remove sys-whonix
  8. qvm-remove vm-name
  9. Or command line.
  10. qvm-shutdown vm-name
  11. qvm-prefs --set vm-name template dummy
  12. The entry
    $tag:whonix-updatevm $default allow,target=sys-whonix
    and
    $tag:whonix-updatevm $anyvm deny
    can remain. These won't have any effect once Qubes TemplateVMs are removed since no VM has the tag whonix-updatevm.
  13. 14.0 14.1 14.2 Note the matching syntax below and the effect of running qubes-template-whonix-gw* or qubes-template-whonix-ws*. Also note the asterisk * wildcard at the end. Depending on the Whonix version, this leads to multiple template packages being uninstalled if they are present:
    • qubes-template-whonix-gw (Whonix 13)
    • qubes-template-whonix-ws (Whonix 13)
    • qubes-template-whonix-gw-14 (stable Whonix release)
    • qubes-template-whonix-ws-14 (stable Whonix release)
    • qubes-template-whonix-gw-15 (future Whonix release)
    • qubes-template-whonix-ws-15 (future Whonix release)
    Wildcards are used so these instructions are valid for all old and future versions of Whonix. Alternatively, the asterisk * syntax could be replaced with a specific template package listed above.

Comments will be deleted after some time. Specifically after comments have been addressed in form of wiki enhancements. See Wiki Comments Policy.


Add your comment
Whonix welcomes all comments. If you do not want to be anonymous, register or log in. It is free.


Random News:

Interested in becoming an author for the Whonix blog or writing about anonymity, privacy and security? Please get in touch!


https | (forcing) onion

Share: Twitter | Facebook

This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! See Conditions for Contributions to Whonix, then Edit! IP addresses are scrubbed, but editing over Tor is recommended. Edits are held for moderation.

Whonix is a licensee of the Open Invention Network. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Libre Software license as Whonix itself. (Why?)

Whonix is provided by ENCRYPTED SUPPORT LP. See Imprint.