Now, I also see A LOT of packages that were automatically installed and are no longer required:
the system suggest me to remove them with apt-get autoremove
root@host:/home/user# sudo apt-get install non-qubes-whonix-workstation
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
non-qubes-whonix-workstation : Depends: whonix-workstation-shared-packages-shared-meta but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@host:/home/user#
But what surprises me when I type the command line sudo apt-get update && sudo apt-get dist-upgrade in the Gateway I receive that warning :
The following packages were automatically installed and are no longer required:
libcdio13 libdirectfb-1.2-9 libgles1-mesa libiso9660-8 libvcdinfo0 libvlccore8
linux-headers-4.9.0-6-amd64 linux-headers-4.9.0-6-common linux-image-4.9.0-6-amd64
Use 'sudo apt autoremove' to remove them.
All these problems let me suppose my system is very sick. But why ? I have never ever touched the Gateway and it seems also that some packages are not necessary anymore.
#!/bin/bash
## Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
## See the file COPYING for copying conditions.
check_meta_packages() {
local meta_package_not_installed meta_package_wanted meta_package_wanted_list
meta_package_wanted="unknown"
if [ "$qubes_detected" = "true" ]; then
meta_package_wanted_list="<code>qubes-whonix-gateway</code> or <code>qubes-whonix-workstation</code>"
if [ "$vm_lower_case_short" = "gateway" ]; then
meta_package_wanted="qubes-whonix-gateway"
elif [ "$vm_lower_case_short" = "workstation" ]; then
meta_package_wanted="qubes-whonix-workstation"
fi
else
meta_package_wanted_list="<code>non-qubes-whonix-gateway-kde</code> or <code>non-qubes-whonix-workstation-kde</code>"
if [ "$vm_lower_case_short" = "gateway" ]; then
meta_package_wanted="non-qubes-whonix-gateway-kde"
elif [ "$vm_lower_case_short" = "workstation" ]; then
meta_package_wanted="non-qubes-whonix-workstation-kde"
fi
fi
if [ "$meta_package_wanted" = "unknown" ]; then
meta_package_not_installed="unknown"
else
if dpkg-query --show "$meta_package_wanted" &> /dev/null ; then
meta_package_not_installed="none"
else
meta_package_not_installed="$meta_package_wanted"
fi
fi
local if_you_know_what_you_are_doing_msg see_also_link
if_you_know_what_you_are_doing_msg="$(if_you_know_what_you_are_doing_funct "$FUNCNAME")"
see_also_link="<a href=https://www.whonix.org/wiki/Whonix_Debian_Packages>https://www.whonix.org/wiki/Whonix_Debian_Packages</a>"
if [ "$meta_package_not_installed" = "none" ]; then
local MSG="<p>Whonix Meta Packages Test Result: $meta_package_not_installed missing. (See also: $see_also_link)</p>"
if [ "$verbose" -ge "1" ]; then
$output_x ${output_opts[@]} --messagex --typex "info" --message "$MSG"
$output_cli ${output_opts[@]} --messagecli --typecli "info" --message "$MSG"
fi
return 0
elif [ "$meta_package_not_installed" = "unknown" ]; then
local MSG="<p>Whonix Meta Packages Test Result: Neither Whonix-Gateway nor Whonix-Workstation detected.
Therefore unchecked, if either the $meta_package_wanted_list meta packages is installed.
<br />See also: $see_also_link
<br />$if_you_know_what_you_are_doing_msg</p>"
else
local MSG="<p>Whonix Meta Packages Test Result: $VM detected, but the meta package <code>$meta_package_not_installed</code> is not installed.
Did you accidentally uninstall it?
<br />See also: $see_also_link
<br />$if_you_know_what_you_are_doing_msg</p>"
fi
$output_x ${output_opts[@]} --messagex --typex "warning" --message "$MSG"
$output_cli ${output_opts[@]} --messagecli --typecli "warning" --message "$MSG"
}
check_unwanted_packages() {
local unwanted_package unwanted_packages_list unwanted_packages_counter dpkg_query_result first
unwanted_packages_counter="0"
for unwanted_package in $whonixcheck_unwanted_package ; do
dpkg_query_result="$(dpkg-query --show --showformat='${Status}\n' "$unwanted_package" 2>/dev/null)" || true
## dpkg_query_result example:
## when installed : install ok installed
## when not fully installed : install ok unpacked
## when removed : deinstall ok config-files
## when purged, no stdout
read -r first _ <<< "$dpkg_query_result"
if [ "install" = "$first" ]; then
unwanted_packages_counter="$(( $unwanted_packages_counter + 1 ))"
unwanted_packages_list+="$unwanted_package "
fi
done
if [ "$unwanted_packages_counter" = "0" ]; then
local MSG="<p>Whonix Unwanted Packages Test Result: None found.</p>"
if [ "$verbose" -ge "1" ]; then
$output_x ${output_opts[@]} --messagex --typex "info" --message "$MSG"
$output_cli ${output_opts[@]} --messagecli --typecli "info" --message "$MSG"
fi
return 0
fi
local if_you_know_what_you_are_doing_msg see_also_link
if_you_know_what_you_are_doing_msg="$(if_you_know_what_you_are_doing_funct "$FUNCNAME")"
see_also_link="<a href=https://www.whonix.org/wiki/Whonix_Debian_Packages>https://www.whonix.org/wiki/Whonix_Debian_Packages</a>"
local packages_help_msg
packages_help_msg="<br></br>1. Open a terminal. ($persistent_changes_start_menu_instructions_first_part Terminal)
<br></br>2. Purge. <blockquote><code>sudo apt-get purge $unwanted_packages_list</code></blockquote>"
if [ "$qubes_detected" = "true" ]; then
if [ "$qubes_vm_persistence" = "full" ]; then
## Running in either StandaloneVM or TemplateVM.
## Above existing packages_help_msg is fine.
true
else
## TemplateBasedVM
packages_help_msg="<br></br>1. Open a terminal. ($persistent_changes_start_menu_instructions_first_part Terminal)
<br></br>2. Purge. <blockquote><code>sudo apt-get purge $unwanted_packages_list</code></blockquote>
3. Shutdown your TemplateVM. (dom0 -> Qubes VM Manager -> right click '<code>$qubes_base_template</code>' -> Shutdown VM)
<br></br>4. Shutdown and restart this TemplateBased <code>$qubes_vm_type</code>. (dom0 -> Qubes VM Manager -> right click '<code>$qubes_name_of_vm</code>' -> Shutdown VM)"
fi
fi
local MSG="<p>Whonix Unwanted Packages Test Result: $unwanted_packages_counter unwanted package(s) installed. \
It is recommended that you remove them from $update_where.
$packages_help_msg
<br />See also: $see_also_link
<br />$if_you_know_what_you_are_doing_msg</p>"
$output_x ${output_opts[@]} --messagex --typex "warning" --message "$MSG"
$output_cli ${output_opts[@]} --messagecli --typecli "warning" --message "$MSG"
}
check_packages() {
check_meta_packages
check_unwanted_packages
}
Output of : dpkg -l non-qubes-whonix-workstation
root@host:/home/user# dpkg -l non-qubes-whonix-workstation
dpkg-query: no packages found matching non-qubes-whonix-workstation
root@host:/home/user#
EDIT : I took a snapshot before the upgrade in case you want me to reverse something.
On my Workstation I still have a lot of packages that the system would like to remove :
The following packages were automatically installed and are no longer required:
anon-shared-applications-kde anon-shared-default-applications anon-shared-desktop anon-shared-desktop-kde anon-shared-packages-dependencies
anon-shared-packages-recommended anon-torchat anon-workstation-packages-dependencies ca-certificates-mono cli-common libexif12 libgdiplus
libjsoncpp1 libmono-accessibility4.0-cil libmono-corlib4.5-cil libmono-data-tds4.0-cil libmono-i18n-west4.0-cil libmono-i18n4.0-cil
libmono-posix4.0-cil libmono-security4.0-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-data4.0-cil
libmono-system-drawing4.0-cil libmono-system-enterpriseservices4.0-cil libmono-system-numerics4.0-cil
libmono-system-runtime-serialization-formatters-soap4.0-cil libmono-system-security4.0-cil libmono-system-transactions4.0-cil
libmono-system-windows-forms4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil libmono-webbrowser4.0-cil mono-4.0-gac mono-gac mono-runtime
mono-runtime-common mono-runtime-sgen non-qubes-vm-enhancements thunderbird whonix-shared-packages-dependencies whonix-shared-packages-recommended
whonix-workstation-packages-dependencies whonix-workstation-packages-recommended xsel xul-ext-torbirdy
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Same on the Gateway :
The following packages were automatically installed and are no longer required:
anon-gateway-default-applications anon-gateway-packages-dependencies
anon-gateway-packages-recommended anon-shared-applications-kde
anon-shared-default-applications anon-shared-packages-dependencies
anon-shared-packages-recommended libcdio13 libdirectfb-1.2-9 libgles1-mesa
libiso9660-8 libvcdinfo0 libvlccore8 linux-headers-4.9.0-6-amd64
linux-headers-4.9.0-6-common linux-image-4.9.0-6-amd64
whonix-gateway-packages-dependencies whonix-gateway-packages-recommended
whonix-shared-packages-dependencies whonix-shared-packages-recommended
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Is that normal ? Can I keep it like this ? Is there a risk to autoremove ? Are these packages useful ?
EDIT : Error message was also present on the Gateway and I had to type the required command line :