I want to remove all the other extra pkgs that i have installed and only keep what cachyos need, yes i also wanna remove kde and other stuff just cachyos pkgs and drivers, is there any way of doing that insted of reinstalling, I don’t care if something goes wrong bcz i have a snapshot of the system I can always recover from that
You must enjoy pain. I would just do a fresh install.
You can run
pacman -Qqe > installed_packages.txt
to get a list of installed packages. You would need a list of essential packages to compare it to.
WARNING: This most likely will destroy your system, but If you knew the base package you could run this command against your pages.txt that was generated and the base package. “base” is the name of the base package.
sudo pacman -Rns $(comm -23 <(sort installed_packages.txt) <(pacman -Sgq base | sort))
You can list the Package groups with:
pacman -Sg <group_name>
If you want to remove KDE or other desktop environments, you can use.
sudo pacman -Rns plasma kde-applications
You can clean up orphaned packages:
sudo pacman -Rns $(pacman -Qdtq)
For me, in the past, I have removed dependencies and caused other issues attempting to do what you are doing. Maybe someone else has an easier way. I just do a clean install.