Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 4234  / 1 Year ago, sun, april 2, 2023, 9:11:53

I have the following versions of Python on my laptop running Ubuntu 20.04:


python2
python3.10
python3.9
python3-pasteurize
python2.7
python3.8
python3-config
python-argcomplete-check-easy-install-script
python3
python3.8-config
python3-futurize
python-argcomplete-tcsh

I know that Ubuntu relies on some of those, which ones can I safely remove?




EDIT:
As asked in the comments, here is the output of ls -l /usr/bin/python[23]* /usr/local/bin/python[23]* :


ls: cannot access '/usr/local/bin/python[23]*': No such file or directory
lrwxrwxrwx 1 root root 9 Mar 13 2020 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3674216 Mar 8 2021 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 Mar 12 2021 /usr/bin/python3 -> python3.8
-rwxr-xr-x 1 root root 5454136 Oct 5 00:09 /usr/bin/python3.10
-rwxr-xr-x 1 root root 5490488 Sep 28 18:10 /usr/bin/python3.8
lrwxrwxrwx 1 root root 33 Sep 28 18:10 /usr/bin/python3.8-config -> x86_64-linux-gnu-python3.8-config
-rwxr-xr-x 1 root root 5405872 Sep 10 01:20 /usr/bin/python3.9
lrwxrwxrwx 1 root root 16 Mar 13 2020 /usr/bin/python3-config -> python3.8-config
-rwxr-xr-x 1 root root 384 Mar 28 2020 /usr/bin/python3-futurize
-rwxr-xr-x 1 root root 388 Mar 28 2020 /usr/bin/python3-pasteurize

More From » 20.04

 Answers
3

These 2 are important:


lrwxrwxrwx 1 root root       9 Mar 13  2020  /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root 9 Mar 12 2021 /usr/bin/python3 -> python3.8

Anything started with python2 expects python 2.7 to be there. And the same goes for python3: it expects python3.8. To be on the safe side: keep python2.7 too; it might not be needed but removing it can break the system.


All others are manually added versions. Removing those will keep the system working but it will delete all software relates to it. So do inspect the packages when you do apt purge or apt remove. If you plan to delete 2.7 too do take extra attention on what the system will delete along with it.


[#1093] Monday, April 3, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ameatoes

Total Points: 321
Total Questions: 106
Total Answers: 112

Location: Belarus
Member since Sat, Jul 18, 2020
4 Years ago
ameatoes questions
Tue, Aug 16, 22, 22:50, 2 Years ago
Fri, May 14, 21, 03:36, 3 Years ago
Sat, Oct 8, 22, 01:00, 2 Years ago
Fri, Feb 17, 23, 14:44, 1 Year ago
Sun, Oct 17, 21, 02:31, 3 Years ago
;