Uninstall Qubes-Whonix™

How to uninstall Qubes-Whonix.
Introduction
[edit]This procedure for a complete uninstallation of Whonix, as documented on this page, is useful before performing a full reinstallation of Qubes-Whonix. [1]
Alternatively, it is possible to Reinstall Qubes-Whonix Templates without a complete uninstallation.
In any case, these procedures are unspecific to Whonix.
- In some situations, using
qvm-template
with the
purge
subcommand

instead of
remove
might be simpler.
remove:Remove installed templates.
purge:Remove installed templates and associated VMs.
Users can replace Whonix version 16 with 17 or any other version number if that is the goal.
Purge
[edit]Might not work due to Qubes issue qvm-template purge whonix-gw-16 results in ERROR: The dummy qube does not provide network![]()
.
1. Shutdown required App Qubes.
Shutdown of all Whonix App Qubes is required if they are using whonix-gateway-17 or whonix-workstation-17 as a Template or Net Qube.
2. App Qubes Configuration
If no App Qubes that the user intends to keep are using whonix-gateway-17 or whonix-workstation-17 as a Template or Net Qube, proceeding with qvm-template purge should be safe.
3. Purge Whonix-Gateway™
qvm-template purge whonix-gateway-17
4. Review the output.
Sample output:
This will completely remove the selected VM(s)... whonix-gateway-17 sys-whonix anon-whonix whonix-workstation-17-dvm custom-vm-using-whonix-workstation-17-template Are you sure? [y/N]
5. Confirm or abort.
To proceed, a capital (big letter) Y must be typed and confirmed with enter.
6. Purge Whonix-Workstation™
qvm-template purge whonix-workstation-17
Whonix-Workstation Removal
[edit]Remove Whonix-Workstation App Qubes
[edit]The anon-whonix Whonix-Workstation App Qube [2] must be manually removed. Alternatively, you can stop using Whonix Templates in VM Template Settings.
If anon-whonix was previously used, strongly consider backing up any important files before proceeding.
1. Remove anon-whonix.
Qube Manager→right-click Whonix App Qubeanon-whonix→Delete qube[3]
2. Repeat the above step for any other App Qubes based on the Whonix-Workstation Template whonix-workstation-17 that were created earlier. Replace vm-name with the actual name of the VM.
Qube Manager→right-click Whonix App Qubevm-name→Delete qube[4]
Remove the Whonix-Workstation Disposable Template
[edit]The whonix-workstation-17-dvm domain must be manually removed. Alternatively, you can stop using Whonix Templates in VM Template Settings.
In the case of a customized Whonix-Workstation Disposable Template, strongly consider backing up any important files before proceeding.
Launch a dom0 terminal.
Click the Qubes App Launcher (blue/grey "Q") → Open the Terminal Emulator (Xfce Terminal)
1. Set the default Disposable for anon-whonix to "". This is only required if you choose to skip removal of anon-whonix as documented above.
qvm-prefs anon-whonix default_dispvm ""
2. Repeat the above step for all other App Qubes that are based on the Whonix-Workstation Template whonix-workstation-17 that were created earlier. Replace vm-name with the actual name of the VM.
qvm-prefs vm-name default_dispvm ""
3. Set the default Disposable for whonix-workstation-17-dvm to "".
qvm-prefs whonix-workstation-17-dvm default_dispvm ""
4. Remove whonix-workstation-17-dvm.
qvm-remove whonix-workstation-17-dvm
5. The process of removing whonix-workstation-17-dvm is now complete.
Whonix-Gateway Removal
[edit]Stop using Whonix-Gateway as Qubes UpdateVM
[edit]Set Qubes dom0 UpdateVM to sys-firewall or any VM of your choice.
Note: Upgrades will no longer be torified.
This is only required if you previously chose to update dom0 through Whonix. Regardless, it is a good idea to check the Qubes dom0 UpdateVM setting.
Qube 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 must be undone.
Note: The VM's traffic will no longer be torified.
This is only required if you previously chose to torify a VM's network traffic through Whonix. Regardless, it is a good idea to check the NetVM setting of Qubes VMs.
To set the NetVM of any VM to None (i.e., 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 ProxyVMs
[edit]The sys-whonix Whonix-Gateway ProxyVM [2] must be manually removed. Alternatively, you could stop using Whonix Templates in VM Template Settings.
In the case of a previously used sys-whonix ProxyVM, consider backing up before proceeding. This might include a custom Tor configuration, Onion Services configuration, Bridges configuration, or Tor data for persistent Tor Entry Guards.
1. Remove sys-whonix.
Qube Manager→right-clicksys-whonix→Delete qube[7]
2. Repeat the above step for any other ProxyVM based on the Whonix-Gateway Template whonix-gateway-17 that was created earlier. Replace vm-name with the actual name of the VM.
Qube Manager→right-clickvm-name→Delete qube[8]
Qubes Adjustments
[edit]Stop using Whonix Templates in VM Template Settings
[edit]If a Whonix Template is set as the underlying Template for any VMs, the Template cannot be removed. Therefore, either delete the VM as documented above or unset the Template using Qube Manager. [9]
The VMs can optionally be set to use a dummy template. The advantage of setting a dummy template as the underlying Template is the ability to retain any VMs, along with the user storage contents.
1. Create the dummy Template. [10]
Launch a dom0 terminal.
Click the Qubes App Launcher (blue/grey "Q") → Open the Terminal Emulator (Xfce Terminal)
Execute the following commands.
qvm-create --class Template --label red dummy
Unspecific to Qubes-Whonix™.
The process of creating the dummy Template is now complete.
2. Shut down the Whonix Template if it is already running.
Qube Manager→right-click Whonix Template→Shutdown qube[11]
3. Set the dummy template as the Template.
right-click VM→Qube settings→Template:dummy[12]
The process of setting the dummy template as the VM's underlying Template is complete.
Stop using Whonix-Gateway for Torified Template Updates
[edit]If you do not intend to use Qubes-Whonix again, apply the following steps.
In technical terms, stop using Whonix-Gateway as the dom0 UpdatesProxy for any Templates. This is only required if you previously elected to update Qubes Templates through Whonix.
1. Open /etc/qubes-rpc/policy/qubes.UpdatesProxy with root rights.
2. Search for:
$type:Template $default allow,target=sys-whonix
3. Comment out that line; add a hash (#) in front of it.
#$type:Template $default allow,target=sys-whonix
4. Save.
5. The steps to remove Whonix-Gateway as the dom0 UpdatesProxy are complete.
Uninstall Whonix Templates
[edit]Introduction
[edit]Whonix-Gateway
[edit]- Open a
dom0terminal:Qubes App Launcher (blue/grey "Q")→System Tools→Xfce Terminal - Uninstall all Qubes-Whonix Whonix-Gateway template packages matching
qubes-template-whonix-g*: [14]
sudo qvm-template remove qubes-template-whonix-g*
Review the output of the command before confirming to proceed.
Whonix-Workstation
[edit]- Open a
dom0terminal:Qubes App Launcher (blue/grey "Q")→System Tools→Xfce Terminal - Uninstall all Qubes-Whonix-Workstation template packages matching
qubes-template-whonix-w*: [14]
sudo qvm-template remove qubes-template-whonix-w*
Review the output of the command before confirming to proceed.
All Whonix Template Packages
[edit]- Open a
dom0terminal:Qubes App Launcher (blue/grey "Q")→System Tools→Xfce Terminal - Uninstall all Qubes-Whonix template packages matching
qubes-template-whonix*: [14]
sudo qvm-template remove qubes-template-whonix*
Review the output of the command before confirming to proceed.
Troubleshooting
[edit]If the following error appears when removing the Templates, a manual fix is required.
“ERROR: VM installed by package manager: template-vm-name”
For instructions on how to work around this issue, see: Remove VM Manually![]()
.
Done
[edit]The process of uninstalling Qubes-Whonix is now complete.
In order to use Qubes-Whonix again in the future, follow the Install Qubes-Whonix instructions.
Footnotes
[edit]- ↑ Or if deciding not to use Whonix at all.
- ↑ 2.0 2.1
Qubes glossary

documents
TemplateBasedVM,TemplateBasedVMs, andTemplateBasedHVM. So the spelling ofTemplateBasedAppVMsandTemplateBasedProxyVMsshould be correct. - ↑ qvm-remove anon-whonix
- ↑ qvm-remove vm-name
- ↑ To revert this change, run: qubes-prefs updatevm sys-firewall
- ↑ qubes-prefs --set vm-name netvm ""
- ↑ qvm-remove sys-whonix
- ↑ qvm-remove vm-name
- ↑ Or use the command line.
- ↑
- ↑ qvm-shutdown vm-name
- ↑ qvm-prefs --set vm-name template dummy
- ↑
The entries
$tag:whonix-updatevm $default allow,target=sys-whonix
and
$tag:whonix-updatevm $anyvm deny
can remain. These will not have any effect once Qubes Templates are removed since no VM has the tag
whonix-updatevm. - ↑ 14.0 14.1 14.2
Note the matching syntax below and the effect of running
qubes-template-whonix-g*orqubes-template-whonix-w**. 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-15(deprecated Whonix release)qubes-template-whonix-ws-15(deprecated Whonix release)qubes-template-whonix-gw-16(deprecated Whonix release)qubes-template-whonix-ws-16(deprecated Whonix release)qubes-template-whonix-gateway-17(stable Whonix release)qubes-template-whonix-workstation-17(stable Whonix release)qubes-template-whonix-gateway-18(future Whonix release)qubes-template-whonix-workstation-18(future Whonix release)
*syntax could be replaced with a specific template package listed above.
We believe security software like Whonix needs to remain open source and independent. Would you help sustain and grow the project? Learn more about our 13 year success story and maybe DONATE!




