From d7a784ede53da4aa4a99b899adab043e27736c6b Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Tue, 4 Dec 2018 19:27:12 -0800 Subject: [PATCH 1/8] Create removing-template-vm-applications.md --- .../removing-template-vm-applications.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 customization/removing-template-vm-applications.md diff --git a/customization/removing-template-vm-applications.md b/customization/removing-template-vm-applications.md new file mode 100644 index 00000000..c09003d1 --- /dev/null +++ b/customization/removing-template-vm-applications.md @@ -0,0 +1,74 @@ +--- +layout: doc +title: Removing TemplateVM Packages +permalink: /doc/removing-template-vm-packages/ +redirect_from: +- /doc/removing-thunderbird-from-template-vm/ +--- + +# Removing Template VM Packages +When removing any packages from a default TemplateVM, be sure to check what's being autoremoved by apt or dnf. Some applications, for instance Thunderbird, when being removed, apt and dnf will attempt to autoremove many packages required by qubes for the template to function correctly under qubes. + +As an example see the output of the following: +``` +sudo apt remove thunderbird +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following packages were automatically installed and are no longer required: + debugedit libjs-sphinxdoc libjs-underscore librpm3 librpmbuild3 librpmio3 + librpmsign3 libsqlite0 linux-headers-4.9.0-6-amd64 + linux-headers-4.9.0-6-common linux-image-4.9.0-6-amd64 python-backports-abc + python-cffi-backend python-concurrent.futures python-croniter + python-cryptography python-dateutil python-enum34 python-idna + python-iniparse python-ipaddress python-jinja2 python-libxml2 python-lzma + python-markupsafe python-msgpack python-openssl python-pyasn1 python-pycurl + python-requests python-rpm python-singledispatch python-six python-sqlite + python-sqlitecachec python-tornado python-tz python-urlgrabber + python-urllib3 python-xpyb python-yaml qubes-core-agent-dom0-updates + qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter + qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter + qubes-usb-proxy rpm rpm-common rpm2cpio salt-common salt-ssh usbutils yum + yum-utils +Use 'sudo apt autoremove' to remove them. +The following packages will be REMOVED: + icedove lightning qubes-thunderbird qubes-vm-recommended thunderbird +0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded. +After this operation, 151 MB disk space will be freed. +Do you want to continue? [Y/n] +``` + +Note all of the qubes packages are tracked as dependancies that will no longer be required. With apt continuing will only remove the 5 packages listed, which is ok. If, however you also run ``apt autoremove`` the other qubes packages necessary for TemplateVMs will be removed. + +If you'd still like to remove one of these applications without breaking your TemplateVM you have a couple different options. + +## Removing Without Autoremove + +### Debian + 1. Run ``apt remove package-name`` noting the packages "no longer required" + 1. If the list of "no longer required" packages includes anything beginning with ``qubes-`` or ``salt-`` make a note to yourself to never run ``apt autoremove`` on this TemplateVM + +**Recommended but optional:** Use apt-mark to make autoremove safe again. ``apt mark-manual package-name package-name`` + +Replace package-names with actual ``qubes-*`` and ``salt-*`` packages you'd like to retain. + +For example: +```sudo apt-mark manual qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh qubes-usb-proxy``` + +``apt autoremove`` should now be safe to use. +### Fedora + 1. Run ``dnf remove --noautoremove package-name`` + + + ## Recovering A TemplateVM which you've already removed thunderbird and qubes-* packages +If you've already removed packages, autoremoved and restarted your VM you've lost passwordless sudo access. You can login as root through dom0: +```qvm-run -u root vmname xterm``` + +Once you're logged in as root or if you're using debian and haven't rebooted the TemplateVM after the initial removal of these packages, reinstall these packages & their dependancies (use ``sudo`` if you haven't rebooted yet): + +### Debian +```apt install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` + +### Fedora +Similar to Debian for example (package names may vary): +```dnf install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` From 0e8af6cbf0eb069f3df26b78d0dbd64d124b7e27 Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Tue, 4 Dec 2018 19:31:45 -0800 Subject: [PATCH 2/8] Added new link to safely removing packages page --- doc.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc.md b/doc.md index d8673876..67598169 100644 --- a/doc.md +++ b/doc.md @@ -144,6 +144,7 @@ Configuration Guides * [Salt management stack](/doc/salt/) * [Adding SSD storage cache](https://groups.google.com/d/msgid/qubes-users/a08359c9-9eb0-4d1a-ad92-a8a9bc676ea6%40googlegroups.com) * [How to Make a Multimedia TemplateVM](/doc/multimedia/) + * [Safely Removing TemplateVM Packages (Example: Thunderbird)](/doc/removing-template-vm-packages/) Customization Guides From 7fb7f9bbe4bfacd0288a65dd5b7911fcd115f1ad Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Sun, 9 Dec 2018 13:31:07 -0800 Subject: [PATCH 3/8] Renamed file, format to match guidelines, spelling --- .../removing-template-vm-applications.md | 74 ----------------- customization/removing-templatevm-packages.md | 82 +++++++++++++++++++ 2 files changed, 82 insertions(+), 74 deletions(-) delete mode 100644 customization/removing-template-vm-applications.md create mode 100644 customization/removing-templatevm-packages.md diff --git a/customization/removing-template-vm-applications.md b/customization/removing-template-vm-applications.md deleted file mode 100644 index c09003d1..00000000 --- a/customization/removing-template-vm-applications.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -layout: doc -title: Removing TemplateVM Packages -permalink: /doc/removing-template-vm-packages/ -redirect_from: -- /doc/removing-thunderbird-from-template-vm/ ---- - -# Removing Template VM Packages -When removing any packages from a default TemplateVM, be sure to check what's being autoremoved by apt or dnf. Some applications, for instance Thunderbird, when being removed, apt and dnf will attempt to autoremove many packages required by qubes for the template to function correctly under qubes. - -As an example see the output of the following: -``` -sudo apt remove thunderbird -Reading package lists... Done -Building dependency tree -Reading state information... Done -The following packages were automatically installed and are no longer required: - debugedit libjs-sphinxdoc libjs-underscore librpm3 librpmbuild3 librpmio3 - librpmsign3 libsqlite0 linux-headers-4.9.0-6-amd64 - linux-headers-4.9.0-6-common linux-image-4.9.0-6-amd64 python-backports-abc - python-cffi-backend python-concurrent.futures python-croniter - python-cryptography python-dateutil python-enum34 python-idna - python-iniparse python-ipaddress python-jinja2 python-libxml2 python-lzma - python-markupsafe python-msgpack python-openssl python-pyasn1 python-pycurl - python-requests python-rpm python-singledispatch python-six python-sqlite - python-sqlitecachec python-tornado python-tz python-urlgrabber - python-urllib3 python-xpyb python-yaml qubes-core-agent-dom0-updates - qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter - qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter - qubes-usb-proxy rpm rpm-common rpm2cpio salt-common salt-ssh usbutils yum - yum-utils -Use 'sudo apt autoremove' to remove them. -The following packages will be REMOVED: - icedove lightning qubes-thunderbird qubes-vm-recommended thunderbird -0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded. -After this operation, 151 MB disk space will be freed. -Do you want to continue? [Y/n] -``` - -Note all of the qubes packages are tracked as dependancies that will no longer be required. With apt continuing will only remove the 5 packages listed, which is ok. If, however you also run ``apt autoremove`` the other qubes packages necessary for TemplateVMs will be removed. - -If you'd still like to remove one of these applications without breaking your TemplateVM you have a couple different options. - -## Removing Without Autoremove - -### Debian - 1. Run ``apt remove package-name`` noting the packages "no longer required" - 1. If the list of "no longer required" packages includes anything beginning with ``qubes-`` or ``salt-`` make a note to yourself to never run ``apt autoremove`` on this TemplateVM - -**Recommended but optional:** Use apt-mark to make autoremove safe again. ``apt mark-manual package-name package-name`` - -Replace package-names with actual ``qubes-*`` and ``salt-*`` packages you'd like to retain. - -For example: -```sudo apt-mark manual qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh qubes-usb-proxy``` - -``apt autoremove`` should now be safe to use. -### Fedora - 1. Run ``dnf remove --noautoremove package-name`` - - - ## Recovering A TemplateVM which you've already removed thunderbird and qubes-* packages -If you've already removed packages, autoremoved and restarted your VM you've lost passwordless sudo access. You can login as root through dom0: -```qvm-run -u root vmname xterm``` - -Once you're logged in as root or if you're using debian and haven't rebooted the TemplateVM after the initial removal of these packages, reinstall these packages & their dependancies (use ``sudo`` if you haven't rebooted yet): - -### Debian -```apt install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` - -### Fedora -Similar to Debian for example (package names may vary): -```dnf install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` diff --git a/customization/removing-templatevm-packages.md b/customization/removing-templatevm-packages.md new file mode 100644 index 00000000..b24cdc49 --- /dev/null +++ b/customization/removing-templatevm-packages.md @@ -0,0 +1,82 @@ +--- +layout: doc +title: Removing TemplateVM Packages +permalink: /doc/removing-template-vm-packages/ +--- + +# Removing TemplateVM Packages +When removing any packages from a default TemplateVM, be sure to check what's being removed by `apt autoremove` or `dnf`. +When removing certain packages, for instance Thunderbird, `apt` and `dnf` will attempt to remove many packages required by qubes for the template to function correctly under qubes. + +As an example from a terminal in a TemplateVM: +``` +shell_session +$ sudo apt remove thunderbird +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following packages were automatically installed and are no longer required: + debugedit libjs-sphinxdoc libjs-underscore librpm3 librpmbuild3 librpmio3 + librpmsign3 libsqlite0 linux-headers-4.9.0-6-amd64 + linux-headers-4.9.0-6-common linux-image-4.9.0-6-amd64 python-backports-abc + python-cffi-backend python-concurrent.futures python-croniter + python-cryptography python-dateutil python-enum34 python-idna + python-iniparse python-ipaddress python-jinja2 python-libxml2 python-lzma + python-markupsafe python-msgpack python-openssl python-pyasn1 python-pycurl + python-requests python-rpm python-singledispatch python-six python-sqlite + python-sqlitecachec python-tornado python-tz python-urlgrabber + python-urllib3 python-xpyb python-yaml qubes-core-agent-dom0-updates + qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter + qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter + qubes-usb-proxy rpm rpm-common rpm2cpio salt-common salt-ssh usbutils yum + yum-utils +Use 'sudo apt autoremove' to remove them. +The following packages will be REMOVED: + icedove lightning qubes-thunderbird qubes-vm-recommended thunderbird +0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded. +After this operation, 151 MB disk space will be freed. +Do you want to continue? [Y/n] +``` + +Note all of the qubes packages are tracked as dependencies that will no longer be required. `apt remove` will only remove the packages listed, which is ok. +If, however you also run ``apt autoremove`` the other qubes packages necessary for TemplateVMs will be removed. + +If you'd still like to remove one of these applications without breaking your TemplateVM you have a couple different options. + +## Removing Only Packages Not Needed for a Qubes TemplateVM + +### Debian + 1. In your TemplateVM terminal run: + ```shell_session $ apt remove package-name``` + Note the packages "no longer required" + 2. If the list of "no longer required" packages includes anything beginning with `qubes-` or `salt-` make a note to yourself to **never** run `shell_session $ sudo apt autoremove` on this TemplateVM + +**Recommended but optional:** Use `apt-mark` to make `apt autoremove` safe again. +```shell_session $ sudo apt mark-manual package-name package-name``` + +Replace package-names with actual `qubes-*` and `salt-*` packages you'd like to retain. + +For example, still in your TemplateVM terminal: +```shell_session $ sudo apt-mark manual qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh qubes-usb-proxy``` + +`shell_session $ apt autoremove` should now be safe to use. + +### Fedora +In your TemplateVM terminal, run: +```shell_session $ dnf remove --noautoremove package-name``` + + +## Recovering A TemplateVM which you've already removed needed qubes-* packages +If you've already removed packages, run `apt autoremove` and restarted your VM you've lost passwordless sudo access. +You can login as root, open a terminal in dom0 and run: +```shell_session $ qvm-run -u root vmname xterm``` +This will open an xterm terminal in the TemplateVM named `vmname` + +Once you're logged in as root, reinstall these packages & their dependencies: + +### Debian +```shell_session $ sudo apt install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` + +### Fedora +Similar to Debian for example (package names may vary): +```shell_session $ sudo dnf install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` From f11175323b7e6add438f129f6ca2d18916a87a5c Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Sun, 9 Dec 2018 13:34:54 -0800 Subject: [PATCH 4/8] Fix shell_session markup --- customization/removing-templatevm-packages.md | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/customization/removing-templatevm-packages.md b/customization/removing-templatevm-packages.md index b24cdc49..df6e9568 100644 --- a/customization/removing-templatevm-packages.md +++ b/customization/removing-templatevm-packages.md @@ -9,8 +9,7 @@ When removing any packages from a default TemplateVM, be sure to check what's be When removing certain packages, for instance Thunderbird, `apt` and `dnf` will attempt to remove many packages required by qubes for the template to function correctly under qubes. As an example from a terminal in a TemplateVM: -``` -shell_session +```shell_session $ sudo apt remove thunderbird Reading package lists... Done Building dependency tree @@ -49,34 +48,46 @@ If you'd still like to remove one of these applications without breaking your Te 1. In your TemplateVM terminal run: ```shell_session $ apt remove package-name``` Note the packages "no longer required" - 2. If the list of "no longer required" packages includes anything beginning with `qubes-` or `salt-` make a note to yourself to **never** run `shell_session $ sudo apt autoremove` on this TemplateVM + 2. If the list of "no longer required" packages includes anything beginning with `qubes-` or `salt-` make a note to yourself to **never** run `$ sudo apt autoremove` on this TemplateVM **Recommended but optional:** Use `apt-mark` to make `apt autoremove` safe again. -```shell_session $ sudo apt mark-manual package-name package-name``` +```shell_session +$ sudo apt mark-manual package-name package-name +``` Replace package-names with actual `qubes-*` and `salt-*` packages you'd like to retain. For example, still in your TemplateVM terminal: -```shell_session $ sudo apt-mark manual qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh qubes-usb-proxy``` +```shell_session +$ sudo apt-mark manual qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh qubes-usb-proxy +``` -`shell_session $ apt autoremove` should now be safe to use. +`$ apt autoremove` should now be safe to use. ### Fedora In your TemplateVM terminal, run: -```shell_session $ dnf remove --noautoremove package-name``` +```shell_session +$ dnf remove --noautoremove package-name +``` ## Recovering A TemplateVM which you've already removed needed qubes-* packages If you've already removed packages, run `apt autoremove` and restarted your VM you've lost passwordless sudo access. You can login as root, open a terminal in dom0 and run: -```shell_session $ qvm-run -u root vmname xterm``` +```shell_session +$ qvm-run -u root vmname xterm +``` This will open an xterm terminal in the TemplateVM named `vmname` Once you're logged in as root, reinstall these packages & their dependencies: ### Debian -```shell_session $ sudo apt install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` +```shell_session +$ sudo apt install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh +``` ### Fedora Similar to Debian for example (package names may vary): -```shell_session $ sudo dnf install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh``` +```shell_session +$ sudo dnf install qubes-core-agent-dom0-updates qubes-core-agent-passwordless-root qubes-gpg-split qubes-img-converter qubes-input-proxy-sender qubes-mgmt-salt-vm-connector qubes-pdf-converter salt-common salt-ssh +``` From 5f0ad6243a496b5de68c99afef8ff3ba96c7484d Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Sun, 9 Dec 2018 22:55:46 -0800 Subject: [PATCH 5/8] Rename permalink --- customization/removing-templatevm-packages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customization/removing-templatevm-packages.md b/customization/removing-templatevm-packages.md index df6e9568..e7008b52 100644 --- a/customization/removing-templatevm-packages.md +++ b/customization/removing-templatevm-packages.md @@ -1,7 +1,7 @@ --- layout: doc title: Removing TemplateVM Packages -permalink: /doc/removing-template-vm-packages/ +permalink: /doc/removing-templatevm-packages/ --- # Removing TemplateVM Packages From 94440b36c98671f3d1e3c1593ca5efb32897e86f Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Mon, 10 Dec 2018 15:35:10 -0800 Subject: [PATCH 6/8] changed removing-templatevm-packages link --- doc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.md b/doc.md index 67598169..ca5a0cd8 100644 --- a/doc.md +++ b/doc.md @@ -144,7 +144,7 @@ Configuration Guides * [Salt management stack](/doc/salt/) * [Adding SSD storage cache](https://groups.google.com/d/msgid/qubes-users/a08359c9-9eb0-4d1a-ad92-a8a9bc676ea6%40googlegroups.com) * [How to Make a Multimedia TemplateVM](/doc/multimedia/) - * [Safely Removing TemplateVM Packages (Example: Thunderbird)](/doc/removing-template-vm-packages/) + * [Safely Removing TemplateVM Packages (Example: Thunderbird)](/doc/removing-templatevm-packages/) Customization Guides From e5029cb49186017fc2c7ea8b712817419c1fc81f Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Mon, 10 Dec 2018 15:40:00 -0800 Subject: [PATCH 7/8] move removing-templatevm-packages link to Customization instead of Configuration --- doc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.md b/doc.md index ca5a0cd8..7a81d4d5 100644 --- a/doc.md +++ b/doc.md @@ -144,7 +144,6 @@ Configuration Guides * [Salt management stack](/doc/salt/) * [Adding SSD storage cache](https://groups.google.com/d/msgid/qubes-users/a08359c9-9eb0-4d1a-ad92-a8a9bc676ea6%40googlegroups.com) * [How to Make a Multimedia TemplateVM](/doc/multimedia/) - * [Safely Removing TemplateVM Packages (Example: Thunderbird)](/doc/removing-templatevm-packages/) Customization Guides @@ -159,6 +158,7 @@ Customization Guides * [Language Localization](/doc/language-localization/) * [Dark Theme in Dom0 and DomU](/doc/dark-theme/) * [How to make any file in a TemplateBasedVM persistent using bind-dirs](/doc/bind-dirs/) + * [Safely Removing TemplateVM Packages (Example: Thunderbird)](/doc/removing-templatevm-packages/) Troubleshooting From 7f17783e3b0476e7046ebe027bea8b7297de814b Mon Sep 17 00:00:00 2001 From: Josh Fleming Date: Mon, 10 Dec 2018 15:41:41 -0800 Subject: [PATCH 8/8] fix double backticks to single backticks --- customization/removing-templatevm-packages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customization/removing-templatevm-packages.md b/customization/removing-templatevm-packages.md index e7008b52..ddb61f38 100644 --- a/customization/removing-templatevm-packages.md +++ b/customization/removing-templatevm-packages.md @@ -38,7 +38,7 @@ Do you want to continue? [Y/n] ``` Note all of the qubes packages are tracked as dependencies that will no longer be required. `apt remove` will only remove the packages listed, which is ok. -If, however you also run ``apt autoremove`` the other qubes packages necessary for TemplateVMs will be removed. +If, however you also run `apt autoremove` the other qubes packages necessary for TemplateVMs will be removed. If you'd still like to remove one of these applications without breaking your TemplateVM you have a couple different options.