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 python2

So, 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?

  • Your other question is still open and I see no point in this one here. Commented Jun 27, 2017 at 5:32
  • @JuliePelletier This question is more out of curiosity and no matter the outcome of the other question, I still would like to know if there is a way to reinstall Python on Arch Linux. I updated my question. Commented Jun 27, 2017 at 14:03
  • You can, but the warnings are justified since Python is used by the package manager. So if anything gets messed up, you won't be able to use the pacman to solve it. Commented Jun 27, 2017 at 15:26
  • I'm not an Arch user, but I have a suggestion: if you cannot use pacman because you somehow uninstalled python, maybe you can reinstall using something like Anaconda.
    – Anon
    Commented Jun 28, 2017 at 10:13

1 Answer 1


It depends what you mean by reinstalling. To just reinstall:

pacman -S python python2

If 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:

  1. Be sure your system is up-to-date (pacman -Syu).
  2. Download the python packages to be sure they are in cache: pacman -Sw python python2.
  3. Close any running application.
  4. Exit your session if you’re using a WM or DE.
  5. Log into a TTY, stop all services that are not required.
  6. Run pacman -Rddn python python2.
  7. Run pacman -S python python2. You’ll 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .