Archlinux removing python2 from the repositories


[18:00:40] build :: xfce4-build  ➜  ~ » yay -Rc python2               
[sudo] password for build: 
checking dependencies...

Package (1)  Old Version  Net Change

python2      2.7.18-5     -76,84 MiB

Total Removed Size:  76,84 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing python2                                                   [----------------------------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

So check if you still need it or have any used apps installed needing it…
they should show up for removal question when running
yay -Rc python2

And in case it is needed by an application you do need … do NOT remove python2 and wait till there is a replacement PKGBUILD or a solution to the needed package … so check the source for them.


How do you find out if it is needed or not?

You can use the command above sudo pacman -Rc python2 and see if it wants to remove anything else before accepting the removal.

Alternatively, you can use pactree -r python2