Cleaning up with "sudo pacman -R $(pacman -Qtdq)". It is safe?

Hi, I have not cleaned up my system for a while. Usually I do not run into problem using “sudo pacman -R $(pacman -Qtdq)”.

This time it wants to clean up over 2.6GB. Does it look okay for you or does it seem that something is not right with my system?

Pakete (266) assimp-5.4.2-1  compiler-rt15-15.0.7-1  debugedit-5.0-6  debuginfod-0.191-4  dnssec-anchors-20190629-4  elfutils-0.191-4  erlang-nox-27.0.1-1
             gdb-common-15.1-1  geocode-glib-common-3.26.4-4  http-parser-2.9.4-2  iniparser-4.2.4-1  java-hamcrest-1.3-5  kactivities5-5.116.0-1
             kcontacts5-5.116.0-1  kjs-5.115.0-1  kpeople5-5.116.0-1  kpty5-5.116.0-1  libcgif-0.4.1-1  libcutl-1.11.0-3  libmicrohttpd-1.0.1-1
             libtraceevent-1:1.8.3-1  libtracefs-1.8.1-1  libxsd-frontend-2.1.0-2  llvm15-libs-15.0.7-1  oniguruma-6.9.9-1  openimageio-2.5.13.1-1
             openssl-1.1-1.1.1.w-2  perl-inc-latest-0.500-12  plasma-framework5-5.116.0-1  pybind11-2.13.1-2  python-aiohttp-3.9.5-1  python-aiosignal-1.3.1-6
             python-aniso8601-9.0.1-7  python-annotated-types-0.7.0-1  python-anyio-4.4.0-1  python-apipkg-3.0.2-3  python-astroid-3.2.4-1  python-babel-2.14.0-2
             python-blinker-1.7.0-2  python-cheroot-10.0.0-2  python-click-8.1.7-3  python-dill-0.3.8-3  python-distlib-0.3.8-2  python-docutils-1:0.21.2-1
             python-elastic-transport-8.13.1-1  python-flask-2.3.3-2  python-frozenlist-1.4.1-2  python-h11-0.14.0-3  python-httpcore-1.0.5-1  python-httpx-0.27.0-1
             python-imagesize-1.4.1-5  python-importlib-metadata-7.2.1-1  python-iniconfig-2.0.0-5  python-isort-5.13.2-3  python-itsdangerous-2.1.2-4
             python-jaraco.collections-5.0.1-1  python-jinja-1:3.1.4-1  python-joblib-1.3.2-2  python-logutils-0.3.5-13  python-mako-1.3.5-1
             python-manjaro-sdk-1:0.1.1-1  python-markupsafe-2.1.5-2  python-mccabe-0.7.0-7  python-multidict-6.0.5-2  python-orjson-3.10.6-1  python-pandas-2.2.2-2
             python-pluggy-1.5.0-1  python-pooch-1.8.2-1  python-portend-3.2.0-1  python-pydantic-core-1:2.20.1-1  python-pyproject-api-1.7.1-1
             python-pyproject-hooks-1.1.0-1  python-pytest-1:8.3.2-1  python-scipy-1.14.0-1  python-sniffio-1.3.1-3  python-snowballstemmer-2.2.0-6
             python-sphinx-alabaster-theme-0.7.16-2  python-sphinxcontrib-applehelp-2.0.0-1  python-sphinxcontrib-devhelp-2.0.0-2
             python-sphinxcontrib-htmlhelp-2.1.0-1  python-sphinxcontrib-jsmath-1.0.1-17  python-sphinxcontrib-qthelp-2.0.0-1
             python-sphinxcontrib-serializinghtml-2.0.0-1  python-systemd-235-3  python-tempora-5.5.0-1  python-threadpoolctl-3.4.0-2  python-toml-0.10.2-10
             python-tomlkit-0.13.0-1  python-virtualenv-20.26.2-1  python-waitress-3.0.0-2  python-wcwidth-0.2.13-2  python-webob-1.8.7-8  python-webtest-3.0.0-6
             python-werkzeug-3.0.1-1  python-wrapt-1.16.0-3  python-yarl-1.9.4-2  python-zc.lockfile-3.0.post1-3  python-zipp-3.19.2-1  qt5-script-5.15.17-2
             rpm-sequoia-1.6.0-1  source-highlight-3.1.9-12  spdlog-1.14.1-1  threadweaver5-5.116.0-1  alsa-card-profiles-1:1.2.2-1  appstream-glib-0.8.3-1
             aria2-1.37.0-1  atomicparsley-20240608.083822.1ed9031-1  base-devel-1-3  bluez-qt5-5.116.0-1  boost-1.83.0-9  clang15-15.0.7-2  coffeescript-2.7.0-2
             crypto++-8.9.0-1  cunit-2.1.3-4  cython-3.0.10-5  doxygen-1.11.0-4  electron28-28.3.3-2  electron30-30.3.1-1  fcgi-2.4.2-3  flatbuffers-24.3.25-2
             gcab-1.6-2  gdb-15.1-1  geocode-glib-3.26.4-4  gn-0.2174.b3a0bff4-1  gperf-3.1-5  grantlee-5.3.1-2  intltool-0.51.0-6  jq-1.7.1-2  js78-78.15.0-4
             junit-4.13.2-1  kactivities-stats5-5.116.0-1  kcalendarcore5-5.116.0-1  kdav5-1:5.115.0-1  kdesu5-5.116.0-1  kdiagram5-2.8.0-1  kdnssd5-5.116.0-1
             kdsoap-qt5-2.2.0-1  kgamma-6.0.5-1  kholidays5-1:5.116.0-1  khtml-5.115.0-1  kimageformats5-5.116.0-1  kirigami-addons5-0.11.0-7  kpeoplevcard-0.1-2
             kplotting5-5.116.0-1  kquickcharts5-5.115.0-1  kquickimageeditor5-0.3.0-2  kross-5.116.0-1  krunner5-5.115.0-4  ldns-1.8.3-2  leveldb-1.23-3
             lib32-libunwind-1.8.1-1  lib32-libxdamage-1.1.6-1  lib32-readline-8.2.010-1  libcddb-1.3.2-7  libcroco-0.6.13-2  libcurl-compat-8.9.1-1
             libgit2-1:1.8.1-1  libgsf-1.14.52-1  libibus-1.5.30-3  libindicator-gtk3-12.10.1-10  libkdcraw5-24.05.2-1  liblouis-3.30.0-1
             libqaccessibilityclient-qt5-0.6.0-1  librabbitmq-c-0.14.0-1  librdkafka-2.4.0-1  libsmbios-2.4.3-7  libvips-8.15.1-5  libvisual-0.4.2-2
             libxres-1.2.2-2  libxsd-4.2.0-1  lld-18.1.8-1  lua52-5.2.4-7  marble-common-24.05.2-1  meld-3.22.2-3  modemmanager-qt5-5.116.0-1  nasm-2.16.03-1
             nawk-20240728-1  ndctl-79-1  networkmanager-qt5-5.116.0-1  noto-fonts-compat-20151217-1  opencl-headers-2:2024.05.08-1  openshadinglanguage-1.13.10.0-1
             oxygen-sounds-6.0.5-1  patchelf-0.18.0-3  perl-module-build-0.4234-3  perl-parse-yapp-1.21-7  perl-sub-name-0.27-3  pkgfile-22-1
             plasma-systemmonitor-6.0.5-1  podofo-0.9-0.9.8-5  purpose5-5.116.0-1  python-build-1.2.1-3  python-cherrypy-18.9.0-2  python-commonmark-0.9.1-11
             python-contextlib2-21.6.0-2  python-defusedxml-0.7.1-6  python-deprecated-1.2.14-3  python-deprecation-2.1.0-9  python-elasticsearch-8.14.0-1
             python-entrypoints-0.4-4  python-exceptiongroup-1.2.1-2  python-flask-restful-0.3.10-1  python-flit-core-3.9.0-4  python-future-1.0.0-1
             python-installer-0.7.0-8  python-isodate-0.6.1-4  python-lazy-object-proxy-1.10.0-3  python-mock-5.1.0-1  python-networkx-3.3-2  python-nose-1.3.7-16
             python-nspektr-0.5.0-2  python-pbr-6.0.0-4  python-pecan-1.5.1-1  python-pep517-0.13.1-2  python-pkgconfig-1.5.5-6  python-poppler-qt5-21.3.0-3
             python-prettytable-3.10.0-2  python-progress-1.6-8  python-prometheus_client-0.20.0-2  python-py-1.11.0-5  python-pycodestyle-2.11.1-2
             python-pycurl-7.45.3-1  python-pydantic-2.8.2-1  python-pyjwt-2.8.0-2  python-pylint-3.2.6-1  python-pypdf2-2:3.0.1-1  python-pyqt5-webengine-5.15.7-1
             python-pytest-cov-5.0.0-1  python-pyxattr-0.8.1-2  python-resolvelib-1.0.1-2  python-retrying-1.3.4-3  python-scikit-learn-1.5.1-1
             python-sphinx-7.4.7-1  python-tenacity-8.5.0-1  python-testpath-0.6.0-3  python-tox-4.12.1-2  python-websockets-12.0-2  python-xattr-0.10.1-4
             python-xmlsec-1.3.14-1  python-zipfile-deflate64-0.2.0-3  python2-2.7.18-11  qqc2-desktop-style5-5.116.1-1  qt5-3d-5.15.14-1  qt5-charts-5.15.14-1
             qt5-datavis3d-5.15.14-1  qt5-doc-5.15.14-1  qt5-networkauth-5.15.14+kde+r1-1  qt5-scxml-5.15.14-1  qtav-1.13.0-4  qtkeychain-qt5-0.14.3-1
             rabbitmq-3.12.10-1  rest-0.8.1+r4+ge5ee6ef-1  rpm-tools-4.19.1.1-2  shared-color-targets-0.1.7-5  swig-4.2.1-3  syslinux-6.04.pre2.r11.gbf6db5b4-4
             transcode-1.1.7-46  valgrind-3.23.0-5  wayland-protocols-1.36-1  web-installer-url-handler-2.3-1  webrtc-audio-processing-0.3.1-5  xmlstarlet-1.6.1-4
             xorg-server-xvfb-21.1.13-1  xsd-4.2.0-1  yarn-1.22.22-2  yasm-1.3.0-7

Gesamtgröße der entfernten Pakete:  2625,07 MiB

If there is something you know you want to keep - mark those as explicit installed.

From a quick glance it looks safe - but with that size I would definately be suspicious so do yourself a favor and create timesync backup before you execute the command.

Example of a package you should not remove

  • alsa-card-profiles

Removing this will require removal of pipewire related packages - I cannot imagine that is what you want.

If you want to see what would be done add the --print argument to the first pacman command.

I would not remove:

There might be more still useful packages.

Thanks for your answers.

pacman -Qi alsa-card-profiles

shows that it is required by none package. So same for all other packages that I randomly checked.

I think I will remove one by one over the next days and see if it affects my system

I’ve seen so many variants, and when I’ve looked at the hundreds of packages it wants to remove with pacman -Qtdq. Even looking up the parameters, it looks like it could work. But I know wouldn’t of even able to boot my graphical environment if I plugged that into pacman -R.

Even when going through the man page it’s pretty damn hard to find out which combination is the actual one. So I’ve seen the one for custom/foreign packages posed in the forums, which is the one I’ve used before.

pacman -Qqem
btdu
google-chrome

I was able to remove actual junk, and kept 2 AURs.

I’m not speaking with 100% certainty, but what does that command give you?

This gives me a lot of packages I really do not want to remove :wink:

To me this all looks Plasma relevant… alone the version number looks pretty suspicious.

1 Like

No those are the correct version numbers for those who are using Manjaro stable and testing.

Maybe we have some misunderstanding, i meant with this version numbers that its a hint that this packages are needed to run his Plasma Desktop because it has also 6.0.5 and we can assume that they shouldn’t be removed.

1 Like