Skip to content

Instantly share code, notes, and snippets.

@Raymo111
Last active June 18, 2025 04:10
Show Gist options
  • Save Raymo111/74e8f6c998d62fcf5427445388de37b8 to your computer and use it in GitHub Desktop.
Save Raymo111/74e8f6c998d62fcf5427445388de37b8 to your computer and use it in GitHub Desktop.
How to un-bork QT/KWin after rm-rfing *qt6*

So you ran rm -rf /usr/lib/libQt6* /usr/lib/qt6* /usr/include/qt6* /usr/bin/qt6* as root without thinking twice?

...And didn't have any backups of /usr/?

Here's how to fix it.

  1. yay -Qv {plasma-desktop,dolphin,kio,qt6-base} shows the versions of the 3 different systems of QT/KDE packages. Note these down. I got:
plasma-desktop 6.3.5-1
dolphin 25.04.2-1
kio 6.15.0-1
qt6-base 6.9.1-1
  1. Now, take these and put them into sudo pacman -Qe | rg "(25.04.2-|6.3.5-|6.9.1-)" (install ripgrep or replace with another PCRE2-compliant grep).

  2. Install these packages again.

  3. Do the same for sudo pacman -Qd | grep "(25.04.2-|6.3.5-|6.9.1-)" and install these again, taking care to add the --asdeps flag unless you want all your packages marked as explicitly installed.

  4. If you did step 4 without reading "taking care to...", run sudo pacman -D --asdeps on all those packages in step 4.

  5. Enjoy your fixed system. Consider backing up all your files (if you have the space).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment