My strategy is to always install program with flatpak, SDKs are also installed as flatpak, find graphical alternatives to command line programs. I don’t use command line a lot, so I don’t need fancy tools for it.
I only have one system package installed for inputting unicode math symbols. So that I have a clean and easily migratable system.
It is also insecure with possiblity to crash your computer, the only advantage is that it is cheap.