"pacman -Qtdq | pacman -Rns -" detect way too many orphans (5GB)

$ sudo pacman -Qtdq | sudo pacman -Rns - control of dependencies in progress... :: btrfs-progs optionally requires reiserfsprogs: btrfs-convert :: colord optionally requires colord-sane: SANE support :: gnupg optionally requires libusb-compat: scdaemon :: gnupg optionally requires pcsclite: scdaemon :: gnutls optionally requires guile: for use with Guile bindings :: imagemagick optionally requires djvulibre: DJVU support :: jasper optionally requires freeglut: jiv support :: jasper optionally requires glu: jiv support :: jre-openjdk optionally requires gtk2: for the Gtk+ 2 look and feel - desktop usage :: kauth optionally requires python-pyqt5: for the Python bindings :: kcodecs optionally requires python-pyqt5: for the Python bindings :: kcompletion optionally requires python-pyqt5: for the Python bindings :: kconfig optionally requires python-pyqt5: for the Python bindings :: kconfigwidgets optionally requires python-pyqt5: for the Python bindings :: kcoreaddons optionally requires python-pyqt5: for the Python bindings :: kdbusaddons optionally requires python-pyqt5: for the Python bindings :: kguiaddons optionally requires python-pyqt5: for the Python bindings :: ki18n optionally requires python-pyqt5: for the Python bindings :: kio optionally requires kio-extras: extra protocols support (sftp, fish and more) :: kio optionally requires kdoctools: for the help kioslave :: kio optionally requires knetattach: to add new kio-remote entries :: kitemmodels optionally requires python-pyqt5: for the Python bindings :: kitemviews optionally requires python-pyqt5: for the Python bindings :: kjobwidgets optionally requires python-pyqt5: for the Python bindings :: kwidgetsaddons optionally requires python-pyqt5: for the Python bindings :: libcanberra optionally requires libcanberra-pulse: PulseAudio driver :: libcanberra optionally requires libcanberra-gstreamer: GStreamer driver :: libsamplerate optionally requires libsndfile.so: for sndfile-resample :: libtiff optionally requires freeglut: for using tiffgt :: libwebp optionally requires freeglut: vwebp viewer :: mjpegtools optionally requires gtk2: glav GUI :: openssh optionally requires xorg-xauth: X11 forwarding :: pacman optionally requires vim: default merge program for pacdiff :: pinentry optionally requires gtk2: gtk2 backend :: plasma-nm optionally requires openconnect: Cisco AnyConnect VPN plugin :: plasma-workspace optionally requires baloo: Baloo search runner :: pulseaudio optionally requires pulseaudio-alsa: ALSA configuration (recommended) :: python optionally requires python-pip :: sth. optionally requires pkcs11-helper: PKCS-11 plugin :: qt5-tools optionally requires qt5-webkit: for Qt Assistant :: system-config-printer optionally requires python-pysmbc: SMB browser support :: system-config-printer optionally requires cups-pk-helper: PolicyKit helper to configure cups with fine-grained privileges :: systemd optionally requires libmicrohttpd: remote journald capabilities :: systemd optionally requires systemd-sysvcompat: symlink package to provide sysvinit binaries :: udisks2 optionally requires ntfs-3g: NTFS filesystem management support :: vlc optionally requires protobuf: chromecast streaming :: vlc optionally requires lirc: lirc control :: xorg-xrdb optionally requires gcc: for preprocessing attention: manjaro-system is present in HoldPkg. :: HoldPkg has been found in the package list. Do you want to continue? [y/N] y Packages (515) accounts-qml-module-0.7-3  accountsservice-0.6.55-3  alsa-firmware-1.2.1-2                 alsa-oss-1.1.8-3  alsa-plugins-1:1.2.2-2  alsa-utils-1.2.3-2  augeas-1.12.0-2                 baloo-5.74.0-1  baloo-widgets-20.08.1-1  binutils-2.35-2                 breath2-icon-themes-1.0.10-2  breath2-wallpaper-1.0.10-2  bridge-utils-1.7-1                 brltty-6.0-11  cfitsio-1:3.49-1  clucene-2.3.3.4-11  colord-sane-1.4.4+9+g1ce26da-2                 confuse-3.3-1  containerd-1.4.1-1  convertlit-1.8-10  cpio-2.13-2  cracklib-2.9.7-2                 cronie-1.5.5-1  cups-2.3.3-3  cups-filters-1.28.3-1  cups-pdf-3.0.1-5                 cups-pk-helper-0.2.6-4  debootstrap-1.0.123-1  dhcpcd-9.2.0-1  diffutils-3.7-3                 ding-libs-0.6.1-3  discount-2.2.7-1  djvulibre-3.5.27-6  dkms-2.8.3-1.1                 docbook-xml-4.5-9  docbook-xsl-1.79.2-7  dolphin-20.08.1-1  ebook-tools-0.2.2-7                 elfutils-0.181-1  enchant-2.2.10-1  exfat-utils-1.3.0-2  f2fs-tools-1.14.0-1                 flashrom-1.2-2  foomatic-db-3:20200822-1  foomatic-db-engine-4:20200206-1                 foomatic-db-gutenprint-ppds-5.3.3-2  freeglut-3.2.1-2  freerdp-2:2.2.0-2                 game-devices-udev-0.7.9-1  gc-8.0.4-4  gcc-10.2.0-2  glew-2.2.0-2  glu-9.0.1-2                 gnome-icon-theme-symbolic-3.12.0-6  grantlee-5.2.0-3  groff-1.22.4-3  grub-2.04-11.1                 gsfonts-20180524-3  gssproxy-0.8.3-1  gtest-1.10.0-1  gtk-theme-breath-5.9.0-1                 gtk2-2.24.32-2  guile-2.2.6-2  gutenprint-5.3.3-2  harfbuzz-icu-2.7.2-1                 hdparm-9.58-3  hivex-1.3.19-1  hplip-1:3.20.6-3  hyphen-2.8.8-3                 illyria-wallpaper-1.4-1  inetutils-1.9.4-8  iputils-20200821-1  jfsutils-1.1.15-7                 jsoncpp-1.9.3-1  kaccounts-integration-20.08.1-1  kdnssd-5.74.0-1                 kdoctools-5.74.0-1  kdsoap-1.9.0-1  kdsoap-ws-discovery-client-git20200316-2                 kfilemetadata-5.74.0-1  khtml-5.74.0-1  kinit-5.74.0-1  kio-extras-20.08.1-1                 kjs-5.74.0-1  kmenuedit-5.19.5-1  knetattach-5.19.5-1  konsole-20.08.1-1                 kpmcore-4.1.0-1.1  ksysguard-5.19.5-1  lib32-alsa-lib-1.2.3.2-1                 lib32-alsa-oss-1.1.8-2  lib32-alsa-plugins-1.2.2-1  lib32-attr-2.4.48-1                 lib32-db-5.3.28-4  lib32-dbus-1.12.20-1  lib32-flac-1.3.3-1                 lib32-fluidsynth-2.1.5-1  lib32-glew-2.2.0-1  lib32-glib2-2.66.0-1                 lib32-glu-9.0.1-1  lib32-gstreamer-1.16.2-1  lib32-jack-0.125.0-3                 lib32-libasyncns-0.8+3+g68cd5af-2  lib32-libcanberra-0.30+2+gc0620e4-3                 lib32-libcanberra-gstreamer-0.30+2+gc0620e4-3                 lib32-libcanberra-pulse-0.30+2+gc0620e4-3  lib32-libcap-2.43-1                 lib32-libgcrypt-1.8.6-1  lib32-libgpg-error-1.38-1  lib32-libice-1.0.10-1                 lib32-libinstpatch-1.1.5-1  lib32-libltdl-2.4.6+42+gb88cebd5-1  lib32-libogg-1.3.4-2                 lib32-libpulse-13.0-1  lib32-libsm-1.2.3-1  lib32-libsndfile-1.0.28-3                 lib32-libtasn1-4.16.0-1  lib32-libvorbis-1.3.7-1  lib32-libxcrypt-4.4.17-1                 lib32-libxcursor-1.2.0-1  lib32-libxi-1.7.10-2  lib32-libxmu-1.1.3-1                 lib32-libxrender-0.9.10-2  lib32-libxss-1.2.3-1  lib32-libxt-1.2.0-1                 lib32-libxtst-1.2.3-2  lib32-nspr-4.29-1  lib32-nss-3.57-1  lib32-openal-1.20.1-1                 lib32-p11-kit-0.23.21-1  lib32-pcre-8.44-1  lib32-portaudio-1:19.6.0-4                 lib32-sdl2-2.0.12-1  lib32-sqlite-3.33.0-1  lib32-systemd-246.6-1  lib32-tdb-1.4.3-1                 lib32-util-linux-2.36-1  lib32-vulkan-icd-loader-1.2.153-2  libabw-0.1.3-2                 libaccounts-glib-1.25-1  libaccounts-qt-1.16-2  libappimage-1.0.3-1                 libatomic_ops-7.6.10-2  libburn-1.5.2-2  libcanberra-gstreamer-0.30+2+gc0620e4-3                 libcanberra-pulse-0.30+2+gc0620e4-3  libcdr-0.1.6-2  libcmis-0.5.2-4                 libconfig-1.7.2-3  libcurl-gnutls-7.72.0-2  libdbusmenu-glib-16.04.0-4                 libdbusmenu-gtk3-16.04.0-4  libe-book-0.1.3-7  libepubgen-0.1.1-2                 libetonyek-0.1.9-2  libewf-20140608-6  libexttextcat-3.4.5-2  libfontenc-1.1.4-3                 libfreehand-0.1.2-3  libftdi-1.4-4  libgee-0.20.3-2  libgnomekbd-3.26.1+2+g8d02ebd-2                 libgovirt-0.3.7-1  libgssglue-0.4-4  libguestfs-1.42.0-4  libimagequant-2.12.6-1                 libixion-0.15.0-1  libjcat-0.1.3-1  libkcddb-20.08.1-1  libkipi-20.08.1-1                 liblangtag-0.6.3-2  libldm-0.2.4.r20.a856552-1  liblouis-3.15.0-1                 libmicrohttpd-0.9.71-1  libmpc-1.1.0-2  libmspub-0.1.4-7  libmusicbrainz5-5.1.0-4                 libmwaw-0.3.17-1  libnumbertext-1.0.6-1  libodfgen-0.1.7-2  liborcus-0.15.4-1                 libpagemaker-0.0.4-2  libpipeline-1.5.3-1  libpwquality-1.4.2-3  libqxp-0.0.2-4                 librevenge-0.0.4-3  libselinux-3.1-1  libsepol-3.1-1  libslirp-4.3.1-1                 libsmbios-2.4.3-1  libspectre-0.2.9-2  libstaroffice-0.0.7-1  libtommath-1.2.0-3                 libtorrent-rasterbar-1:1.2.10-2  liburcu-0.11.0-2  libusb-compat-0.1.7-1                 libuv-1.40.0-1  libvirt-sandbox-0.8.0-2  libvisio-0.1.7-3  libwpd-0.10.3-2                 libwpe-1.8.0-1  libwpg-0.3.3-2  libwps-0.4.12-1  libxfont2-2.0.4-3                 libxkbfile-1.1.0-2  libxklavier-5.4-3  libxmlb-0.2.1-1  libxvmc-1.0.12-3                 libzip-1.6.1-2  libzmf-0.0.2-8  linux-firmware-20201005.r1732.58d41d0-1                 linux414-4.14.202-1  linux414-virtualbox-host-modules-6.1.14-7  linux58-5.8.16-2                 linux58-virtualbox-host-modules-6.1.14-13  lirc-1:0.10.1-6  lpsolve-5.5.2.5-4                 lrzip-0.631-3  lsb-release-1.4-13  lsof-4.93.2-3  lsscsi-0.31-1  lzop-1.04-3                 m4-1.4.18-3  mailcap-2.1.49-1  make-4.3-3  manjaro-base-skel-20171029-3                 mbedtls-2.16.7-1  mesa-demos-8.4.0-4  mhwd-amdgpu-19.1.0-1  mhwd-ati-19.1.0-1                 mhwd-db-0.6.5-4  mhwd-nvidia-340xx-340.108-1  mhwd-nvidia-390xx-390.132-1                 mhwd-nvidia-418xx-418.113-1  mhwd-nvidia-430xx-430.64-1.0                 mhwd-nvidia-435xx-435.21-1.0  mhwd-nvidia-440xx-440.100-1                 mhwd-nvidia-450xx-450.80.02-1  mhwd-nvidia-455xx-455.28-2  mkinitcpio-28-1.0                 mkinitcpio-busybox-1.31.1-2  mtools-4.0.24-1  mujs-1.0.8-1  multipath-tools-0.8.4-1                 nfsidmap-2.5.1-1  nilfs-utils-2.2.8-2  noto-fonts-compat-20151217-1                 ntfs-3g-2017.3.23-5  openconnect-1:8.10-1  openvpn-2.4.9-2                 opera-ffmpeg-codecs-85.0.4183.102-1  pamac-gtk-9.5.12-1  patch-2.7.6-8                 pcsclite-1.9.0-1  perl-alien-build-2.33-1  perl-alien-libxml2-0.16-2                 perl-capture-tiny-0.48-4  perl-dbi-1.643-2  perl-ffi-checklib-0.27-2                 perl-file-chdir-0.1011-4  perl-file-which-1.23-4  perl-libintl-perl-1.31-5                 perl-path-tiny-0.114-1  perl-xml-libxml-2.0206-1  perl-xml-namespacesupport-1.12-4                 perl-xml-sax-1.02-1  perl-xml-sax-base-1.09-4  pkcs11-helper-1.26.0-2  pkgfile-21-2                 plasma5-themes-breath2-1.0.10-2  polkit-kde-agent-5.19.5-1  poppler-qt5-20.09.0-1                 pptpclient-1.10.0-2  protobuf-3.12.4-1  pulseaudio-alsa-1:1.2.2-2                 pulseaudio-equalizer-13.0-3  pulseaudio-jack-13.0-3  pulseaudio-lirc-13.0-3                 pulseaudio-zeroconf-13.0-3  purpose-5.74.0-1  python-cachecontrol-0.12.6-1                 python-colorama-0.4.3-1  python-contextlib2-0.6.0.post1-1  python-distlib-0.3.1-1                 python-distro-1.5.0-1  python-docopt-0.6.2-7  python-html5lib-1.1-1                 python-keyutils-0.6-4  python-msgpack-1.0.0-1  python-passlib-1.7.2-1                 python-pep517-0.8.2-1  python-pillow-7.2.0-1  python-pip-20.1.1-1                 python-progress-1.5-3  python-pyqt5-5.15.1-2  python-pyqt5-sip-12.8.1-1                 python-pysmbc-1.0.20-1  python-reportlab-3.5.50-1  python-resolvelib-0.4.0-1                 python-retrying-1.3.3-7  python-sip-4.19.24-2  python-toml-0.10.1-2                 python-webencodings-0.5.1-4  python-yaml-5.3.1-2  qemu-5.1.0-1  qgpgme-1.14.0-1                 qpdf-10.0.1-1  qt5-webkit-5.212.0alpha4-7  rasqal-1:0.9.33-3  redland-1:1.0.17-8                 reiserfsprogs-3.6.27-3  rhash-1.4.0-1  rpcbind-1.2.5-3  rsync-3.2.3-1                 rubberband-1.9-1  runc-1.0.0rc92-1  sddm-0.18.1-3  seabios-1.14.0-1  sed-4.8-1                 signon-kwallet-extension-20.08.1-1  signon-plugin-oauth2-0.24-3                 signon-ui-0.17+20171022-2  signond-8.60-3  skopeo-1.1.1-1  sleuthkit-4.9.0-1                 smartmontools-7.1-4  socat-1.7.3.4-2  spice-0.14.3-2  splix-2.0.0-15                 spotify-1:1.1.42.622-2  squashfuse-0.1.103-3  startup-notification-0.12-7                 stoken-0.92-4  strace-5.8-1  supermin-5.2.0-3  syslinux-6.04.pre2.r11.gbf6db5b4-3                 systemd-sysvcompat-246.6-1  systemsettings-5.19.5-1  texinfo-6.7-3  tpm2-tss-3.0.1-1                 tracker-2.3.6-1  uchardet-0.0.7-1  usbutils-012-2  v86d-0.1.10-5.1                 vamp-plugin-sdk-2.10.0-1  vde2-2.3.2-14  vim-8.2.1704-1  vim-runtime-8.2.1704-1                 virglrenderer-0.8.2-1  virtualbox-6.1.14-1  virtualbox-host-dkms-6.1.14-1                 vpnc-1:0.5.3.r468.r81-1  webkit2gtk-2.30.1-1  wget-1.20.3-3  woff2-1.0.2-3                 wpebackend-fdo-1.8.0-1  xapian-core-1:1.4.17-2  xapp-1.8.10-1                 xf86-input-libinput-0.30.0-1  xorg-fonts-encodings-1.0.5-2  xorg-server-1.20.9-2                 xorg-server-common-1.20.9-2  xorg-setxkbmap-1.3.2-2  xorg-xauth-1.1-2                 xorg-xdpyinfo-1.3.2-4  xorg-xkbcomp-1.4.3-1  xorg-xmodmap-1.0.10-2                 xorg-xrandr-1.5.1-2  yara-4.0.2-1  zenity-3.32.0+50+gc229637-1  zsh-5.8-1                 zsh-autosuggestions-0.6.4-1  zsh-completions-0.32.0-1                 zsh-history-substring-search-1.0.2-1  zsh-syntax-highlighting-0.7.1-1  acpi-1.7-3                 acpid-2.0.32-2  amd-ucode-20201005.r1732.58d41d0-1  android-tools-30.0.3-1                 android-udev-20200613-1  appimagelauncher-2.1.4-1  ark-20.08.1-1  autoconf-2.69-7                 automake-1.16.2-3  b43-fwcutter-019-3  bison-3.6.4-1  cantata-2.4.2-1                 chromium-86.0.4240.111-2  cmake-3.18.3-1  cpupower-5.7-1  discord-0.0.12-0                 docker-1:19.03.12-2  dolphin-plugins-20.08.1-1  ecryptfs-utils-111-4                 fakeroot-1.24-2  filelight-20.08.1-1  firefox-82.0.2-0.1  flex-2.6.4-3                 fwupd-1.4.6-1  gnome-boxes-3.36.6-1  gnome-icon-theme-3.12.0-6                 grub-theme-manjaro-20.1-1  gwenview-20.08.1-1  htop-3.0.2-1  intltool-0.51.0-6                 inxi-3.1.05+2-1  k3b-1:20.08.1-1  kaccounts-providers-20.08.1-1  kate-20.08.1-1                 kcalc-20.08.1-1  kde-gtk-config-5.19.5-1  kdenetwork-filesharing-20.08.1-1                 kdeplasma-addons-5.19.5-1  kernel-alive-0.5-1  kfind-20.08.1-1  kgamma5-5.19.5-1                 kget-20.08.1-1  khelpcenter-20.08.1-1  khotkeys-5.19.5-1  kinfocenter-5.19.5-1                 konversation-1.7.5-3  krdc-20.08.1-1  ksystemlog-20.08.1-1  kwallet-pam-5.19.5-1                 kwayland-integration-5.19.5-1  kwrited-5.19.5-1  latte-dock-0.9.11-1                 lib32-mesa-demos-8.4.0-2  libreoffice-still-6.4.6-2  licenses-20200427-1                 man-db-2.9.3-1  man-pages-5.08-1  manjaro-alsa-20200126-1                 manjaro-browser-settings-20200629-1  manjaro-documentation-en-20181009-1                 manjaro-firmware-20160419-1  manjaro-hotfixes-2018.08-6                 manjaro-kde-settings-20200804-1  manjaro-printer-20200215-2                 manjaro-pulse-20200126-1  manjaro-release-20.1.2-1                 manjaro-settings-manager-kcm-0.5.6-10  manjaro-system-20200906-1                 manjaro-wallpapers-18.0-1.4-3  manjaro-zsh-config-0.15-1  memtest86+-5.01-4                 mhwd-0.6.5-2  mkinitcpio-openswap-0.1.0-3  mpv-1:0.32.0-4  mtpfs-1.1-4  nano-5.2-1                 networkmanager-openconnect-1.2.6-2  networkmanager-openvpn-1.8.12-1                 networkmanager-pptp-1.2.9dev+10+gb41b0d0-2                 networkmanager-vpnc-1.2.7dev+20+gdca3aea-2  nfs-utils-2.5.1-1  ntp-4.2.8.p15-1                 numlockx-1.2-5  obs-studio-25.0.8-2  okular-20.08.1-1  oxygen-5.19.5-1                 oxygen-icons-1:5.74.0-1  pamac-tray-icon-plasma-0.1.1-1  partitionmanager-4.1.0-1                 pkgconf-1.7.3-1  plasma-browser-integration-5.19.5-1  plasma-desktop-5.19.5-1                 plasma-pa-5.19.5-1  plasma-simplemenu-1.0.12-1  powertop-2.13-1                 proxychains-ng-4.14-2  qbittorrent-4.2.5-1  qtermwidget-0.15.0-1                 rpcsvc-proto-1.4.2-1  screenfetch-3.9.1-1  scrub-2.6.1-1                 sddm-breath2-theme-1.0.10-2  sddm-kcm-5.19.5-1  spectacle-20.08.1-1                 spectre-meltdown-checker-0.43-1  spice-protocol-0.14.2-1                 spotify-adblock-linux-1.2-1  steam-manjaro-1.0.0.66-1  swig-4.0.2-1                 systemd-fsck-silent-239-1  systemd-kcm-1.2.1-5  teams-1.3.00.25560-1                 terminus-font-4.48-3  thunderbird-68.12.0-1  timeshift-20.03.r8.gad3c01c-1                 tlp-1.3.1-2  ttf-inconsolata-1:3.000-2  ttf-indic-otf-0.2-11  udiskie-2.2.0-2                 user-manager-5.19.5-1  vi-1:070224-4  virt-bootstrap-git-r153.8a7e752-1                 virt-viewer-8.0-2  virtualbox-ext-oracle-6.1.16-1  wallpapers-2018-1.2-1                 wallpapers-juhraya-1.1-2  xdg-user-dirs-0.17-3  xdotool-3.20160805.1-3                 xf86-input-elographics-1.4.2-2  xf86-input-evdev-2.10.6-2  xf86-input-void-1.4.1-5                 xf86-video-amdgpu-19.1.0-2  xf86-video-ati-1:19.1.0-2                 xf86-video-intel-1:2.99.917+908+g7181c5a4-1  xf86-video-nouveau-1.0.16-2                 xorg-xinit-1.4.1-2  xorg-xkill-1.0.5-2  xz-static-5.2.5-1  yakuake-20.08.1-1                 zensu-0.1-1  Total size of removed packets:  5065,66 MiB

All started from when I removed virt-manager without dependencies:

pacman -R virt-manager

So I did:

pacman -Qtdq | pacman -Rns -

and it correctly displayed the dependencies.

But then I installed it again:

pacman -S virt-manager

and then if I do:

pacman -Qtdq | pacman -Rns -

I got the problem. I’m stuck.

Please edit your post - it is unreadable

use code fence ``` on separate lines or indent lines by 4 spaces.

Or use the </> button in the toolbar

Well … whats pacman -Qtdq show ?

$ sudo pacman -Qtdq
[sudo] password di allexj: 
acpi
acpid
amd-ucode
android-tools
android-udev
appimagelauncher
ark
autoconf-archive
b43-fwcutter
bison
bolt
cantata
chromium
clutter-gst
cmake
colord-gtk
cpupower
ctags
discord
dleyna-renderer
docker
dolphin-plugins
ecryptfs-utils
exempi
fakeroot
filelight
firefox
flatpak-builder
flex
folks
frei0r-plugins
fwupd
gegl
gjs
gmime3
gnome-autoar
gnome-bluetooth
gnome-desktop
gnome-epub-thumbnailer
gnome-icon-theme
gnome-online-miners
gom
grub-theme-manjaro
gsound
gspell
gst-plugin-gtk
gtkmm3
gwenview
htop
intltool
inxi
ipython
jsonrpc-glib
k3b
kaccounts-providers
kate
kcalc
kde-gtk-config
kdenetwork-filesharing
kdeplasma-addons
kernel-alive
kfind
kgamma5
kget
khelpcenter
khotkeys
kinfocenter
konversation
krdc
ksystemlog
kwallet-pam
kwayland-integration
kwrited
latte-dock
lib32-mesa-demos
libchamplain
libcryptui
libcue
libdazzle
libdmapsharing
libgdm
libgepub
libgit2-glib
libgnome-games-support
libgrss
libgtop
libgxps
libhandy
libiptcdata
libmanette
libmediaart
libnautilus-extension-typeahead
libpackagekit-glib
libpeas
libportal
libpst
libreoffice-still
libsynctex
libwnck3
libytnef
licenses
malcontent
man-db
man-pages
manjaro-alsa
manjaro-browser-settings
manjaro-documentation-en
manjaro-firmware
manjaro-hotfixes
manjaro-kde-settings
manjaro-printer
manjaro-pulse
manjaro-release
manjaro-settings-manager-kcm
manjaro-system
manjaro-wallpapers-18.0
manjaro-zsh-config
memtest86+
meson
mhwd
mkinitcpio-openswap
mod_dnssd
mpv
mtpfs
nano
networkmanager-openconnect
networkmanager-openvpn
networkmanager-pptp
networkmanager-vpnc
nfs-utils
nm-connection-editor
ntp
numlockx
obs-studio
okular
oxygen
oxygen-icons
pamac-tray-icon-plasma
partitionmanager
plasma-browser-integration
plasma-desktop
plasma-pa
plasma-simplemenu
powertop
proxychains-ng
python-atspi
python-pycodestyle
python-pyflakes
python-pylint
python-simplejson
python-sphinx
python-xlib
qbittorrent
qqwing
qtermwidget
rpcsvc-proto
ruby-dbus
ruby-sass
screenfetch
scrub
sddm-breath2-theme
sddm-kcm
shared-color-targets
spectacle
spectre-meltdown-checker
spice-protocol
spotify-adblock-linux
steam-manjaro
swig
systemd-fsck-silent
systemd-kcm
t1lib
teams
telepathy-idle
telepathy-logger
telepathy-mission-control
template-glib
tepl
terminus-font
thunderbird
timeshift
tlp
ttf-inconsolata
ttf-indic-otf
udiskie
user-manager
vala
vi
virt-bootstrap-git
virt-viewer
virtualbox-ext-oracle
wallpapers-2018
wallpapers-juhraya
whois
xdg-user-dirs
xdotool
xf86-input-elographics
xf86-input-evdev
xf86-input-void
xf86-video-amdgpu
xf86-video-ati
xf86-video-intel
xf86-video-nouveau
xorg-server-xwayland
xorg-xhost
xorg-xinit
xorg-xkill
xz-static
yakuake
yelp-xsl
zensu
zip

sudo pacman -Qtdq would list orphans and dependencies

pacman -Q --help

-d, --deps           list packages installed as dependencies [filter]

-t, --unrequired     list packages not (optionally) required by any
                       package (-tt to ignore optdepends) [filter]

So using a pipe for this command to a pacman -R command may be trying to delete all dependencies and orphans instead of just orphans

You don’t need sudo to do that.

I was quoting from the previous post
There are lot of packages listed that could not be orphans but I can see cmake and meson which would typically be orphans
I just checked if sudo may have had an effect on the command but I get the same list of files that is also shown with pamac list -oq

but these are NOT orphans… there are A LOT of SYSTEM packages… they are not supposed to be orphans…

Many of your listed packages (if not all) are usually installed explicit and should not show up when “-d” option is used - which shows packages installed as dependency.

2 Likes

Output of:

pacman -Qe?

2 Likes

# pacman -Qe
gnome-boxes 3.36.6-1

Well, @allexj you’ve got some issue here (to put it mildly).

I see four ways you can proceed…

  1. LITFA™ (leave it the frakk alone) and go about your business.

  2. Work backwards thru your pacman log and manually reverse any changes. Look for these types of entries:

[2020-07-29T23:16:27-0400] [PACMAN] Running 'pacman -D --asexplicit fzf'
  1. Bite the bullet and reinstall.

  2. I guess you might be able pipe the output of your current pacman -Qdtq to a pacman -D --asexplicit command (don’t know, never tried). Downside is that everything you have installed will be marked explicit, and when you remove a package, the deps installed with it will not be removed.

Maybe next time you’ll check a commands’ output before you pipe it to some other command. It’ll save you some headaches.

Pro tip…add --print to the tail end of any pacman command, and it will just print out the list of what it (pacman) is going to do.

3 Likes

I guess you have wrong interpreted this Arch wiki page, @allexj

https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Removing_unused_packages_(orphans)

and applied

# pacman -D --asdeps $(pacman -Qqe)

This is hard to fix. :man_shrugging:

2 Likes

yes… you are right… I did something stupid.

Now I did: sudo pacman -Qtdq | sudo pacman -D --asexplicit - ad it apparently “fixed” the issue, but I guess that there will be some other problems with it?

Well, you can check…scripters can jump in; I’m not a coder.

  1. pacman -Qe > ~/current_exp.txt
  2. Copy the list from your post #4 and save it as ~/foobar_exp.txt
  3. Diff those 2 files.

Now the fun part…

  1. That list in your OP will need some editing. Get that, fix it up and save it as ~/forum_op.txt
  2. Diff that against ~/current_exp.txt. Anything ONLY existing ~/forum_op.txt is most likely a dependency of some package. However, if you borked your pacman database, you probably won’t be able to use pacman to determine orphans.
1 Like

what’s the purpose of the first 3 steps if the operation in itself is in the 4th and 5th step?

so if I have understood, I should take the output of the FIRST post (the thread), edit it and put it in a txt (forum_op.txt) and diff it with current_exp.txt… and the lines that exist ONLY in forum_op, are dependencies and I should mark them with pacman -D --asdeps deps.txt ?

However, if you borked your pacman database, you probably won’t be able to use pacman to determine orphans.

what you mean? so this problem can’t be fixed?

Step one takes the output of pacman and prints the output to a file.

Step 2 is pretty self explanatory.

The third step is to verify your piped command (post 4 was an output of -Qtdq, prior to this) actually re-marked all those packages as explicit.

The final 2 steps check your original post against the file from step 1. For example: in OP there is a package rubberband that is not in post 4.

If just one of those files in post 4 was an actual orphan…it’s now marked as explicitly installed.

As an aside…in OP I saw that timeshift was listed. Why didn’t you roll back?

1 Like

I still don’t have very clear the purpose of foobar_exp.txt.

Btw, what I did is:
diff current_exp.txt with forum_op.txt and the lines that ARE IN forum_op BUT NOT in current_exp, I saved them in a txt file.

Then I did:
cat file.txt | sudo pacman -D --asdeps $(tee)

But else should I do? What to do with foorbar_exp?

It was for an intermediate check. Nothing more. Nuke it from orbit. :slight_smile:

Run a pacman -Qqdt and see if it outputs any orphans.

1 Like
$ pacman -Qqdt
man-pages
virt-viewer

So it’s basically fixed? :smiley: or not?