I had a problem with my Python installation on Arch Linux and that made me wonder if there is any way to reinstall Python and Python2 on Arch Linux.My guessing is that I should not do something like:pacman -Rns python python2So, is it safe to just uninstall Python and Python2 and then install them again? Or is there a safe way to do this?I searched and found this, which states that: Better not to mess up with the python installations ...Does this mean that I cannot reinstall Python?
Reinstall Python and Python2 on Arch Linux
arch linux;software installation;python
It depends what you mean by reinstalling. To just reinstall:pacman -S python python2If you mean purging from the system, then reinstalling, pacman -Rns python python2 will likely not work because you will have packages depending on those. If you still want to do this, you can but to be on the safe side:Be sure your system is up-to-date (pacman -Syu).Download the python packages to be sure they are in cache: pacman -Sw python python2.Close any running application.Exit your session if youre using a WM or DE.Log into a TTY, stop all services that are not required.Run pacman -Rddn python python2.Run pacman -S python python2. Youll likely want to specify --asdeps too.That being said, this whole process is unlikely to bring anything more than the first, way more safe, command.