How to remove Python 2 in 16.04?
up vote
8
down vote
favorite
Ubuntu has dropped Python 2 in 16.04. It is still installed after an upgrade, though (it was not part of the "obsolete packages").
Is there a clean way to remove Python 2 and all its dependencies in a clean way (to completely get rid of it)?
Is an apt purge
the way to go?
root@ubuntu ~# apt purge python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnss-ldap
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
auth-client-config* ldap-auth-client* ldap-auth-config* libpam-ldap* libsmbclient* ndiff* python* python-bs4* python-chardet* python-crypto* python-dnspython*
python-html5lib* python-ldb* python-lxml* python-ntdb* python-pkg-resources* python-samba* python-setuptools* python-six* python-talloc* python-tdb* python2.7* samba*
samba-common-bin* samba-dsdb-modules* samba-libs* samba-vfs-modules* smbclient* winbind*
0 upgraded, 0 newly installed, 29 to remove and 0 not upgraded.
After this operation, 58.4 MB disk space will be freed.
package-management python uninstall 16.04
|
show 1 more comment
up vote
8
down vote
favorite
Ubuntu has dropped Python 2 in 16.04. It is still installed after an upgrade, though (it was not part of the "obsolete packages").
Is there a clean way to remove Python 2 and all its dependencies in a clean way (to completely get rid of it)?
Is an apt purge
the way to go?
root@ubuntu ~# apt purge python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnss-ldap
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
auth-client-config* ldap-auth-client* ldap-auth-config* libpam-ldap* libsmbclient* ndiff* python* python-bs4* python-chardet* python-crypto* python-dnspython*
python-html5lib* python-ldb* python-lxml* python-ntdb* python-pkg-resources* python-samba* python-setuptools* python-six* python-talloc* python-tdb* python2.7* samba*
samba-common-bin* samba-dsdb-modules* samba-libs* samba-vfs-modules* smbclient* winbind*
0 upgraded, 0 newly installed, 29 to remove and 0 not upgraded.
After this operation, 58.4 MB disk space will be freed.
package-management python uninstall 16.04
2
What exactly do you mean by "clean way"? Python2 is only installed if some of the packages need it. Removing it might break the system.
– mikewhatever
Apr 23 '16 at 9:36
@mikewhatever: I did an upgrade from 15.10 where Python 2 was needed by the system. Since 16.04 does not ship it at all it means it is not needed anymore. So removing Python 2 should not break the system - which is what I fear the most. As for extra software - it does not matter if they break (I will remove them as well in that case)
– WoJ
Apr 23 '16 at 9:39
Well, good luck then. :~)
– mikewhatever
Apr 23 '16 at 9:46
3
However, many apps still need it. Maybe the update installed something requiringpython2
? I'd say don't remove it.
– UniversallyUniqueID
Apr 23 '16 at 9:58
@BharadwajRaju: wouldn'tapt purge
show me the dependencies? - and allow me to make up my mind (in my casesamba
would be a problematic package to remove for instance)
– WoJ
Apr 23 '16 at 10:00
|
show 1 more comment
up vote
8
down vote
favorite
up vote
8
down vote
favorite
Ubuntu has dropped Python 2 in 16.04. It is still installed after an upgrade, though (it was not part of the "obsolete packages").
Is there a clean way to remove Python 2 and all its dependencies in a clean way (to completely get rid of it)?
Is an apt purge
the way to go?
root@ubuntu ~# apt purge python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnss-ldap
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
auth-client-config* ldap-auth-client* ldap-auth-config* libpam-ldap* libsmbclient* ndiff* python* python-bs4* python-chardet* python-crypto* python-dnspython*
python-html5lib* python-ldb* python-lxml* python-ntdb* python-pkg-resources* python-samba* python-setuptools* python-six* python-talloc* python-tdb* python2.7* samba*
samba-common-bin* samba-dsdb-modules* samba-libs* samba-vfs-modules* smbclient* winbind*
0 upgraded, 0 newly installed, 29 to remove and 0 not upgraded.
After this operation, 58.4 MB disk space will be freed.
package-management python uninstall 16.04
Ubuntu has dropped Python 2 in 16.04. It is still installed after an upgrade, though (it was not part of the "obsolete packages").
Is there a clean way to remove Python 2 and all its dependencies in a clean way (to completely get rid of it)?
Is an apt purge
the way to go?
root@ubuntu ~# apt purge python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnss-ldap
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
auth-client-config* ldap-auth-client* ldap-auth-config* libpam-ldap* libsmbclient* ndiff* python* python-bs4* python-chardet* python-crypto* python-dnspython*
python-html5lib* python-ldb* python-lxml* python-ntdb* python-pkg-resources* python-samba* python-setuptools* python-six* python-talloc* python-tdb* python2.7* samba*
samba-common-bin* samba-dsdb-modules* samba-libs* samba-vfs-modules* smbclient* winbind*
0 upgraded, 0 newly installed, 29 to remove and 0 not upgraded.
After this operation, 58.4 MB disk space will be freed.
package-management python uninstall 16.04
package-management python uninstall 16.04
edited Apr 23 '16 at 9:43
asked Apr 23 '16 at 9:34
WoJ
4732924
4732924
2
What exactly do you mean by "clean way"? Python2 is only installed if some of the packages need it. Removing it might break the system.
– mikewhatever
Apr 23 '16 at 9:36
@mikewhatever: I did an upgrade from 15.10 where Python 2 was needed by the system. Since 16.04 does not ship it at all it means it is not needed anymore. So removing Python 2 should not break the system - which is what I fear the most. As for extra software - it does not matter if they break (I will remove them as well in that case)
– WoJ
Apr 23 '16 at 9:39
Well, good luck then. :~)
– mikewhatever
Apr 23 '16 at 9:46
3
However, many apps still need it. Maybe the update installed something requiringpython2
? I'd say don't remove it.
– UniversallyUniqueID
Apr 23 '16 at 9:58
@BharadwajRaju: wouldn'tapt purge
show me the dependencies? - and allow me to make up my mind (in my casesamba
would be a problematic package to remove for instance)
– WoJ
Apr 23 '16 at 10:00
|
show 1 more comment
2
What exactly do you mean by "clean way"? Python2 is only installed if some of the packages need it. Removing it might break the system.
– mikewhatever
Apr 23 '16 at 9:36
@mikewhatever: I did an upgrade from 15.10 where Python 2 was needed by the system. Since 16.04 does not ship it at all it means it is not needed anymore. So removing Python 2 should not break the system - which is what I fear the most. As for extra software - it does not matter if they break (I will remove them as well in that case)
– WoJ
Apr 23 '16 at 9:39
Well, good luck then. :~)
– mikewhatever
Apr 23 '16 at 9:46
3
However, many apps still need it. Maybe the update installed something requiringpython2
? I'd say don't remove it.
– UniversallyUniqueID
Apr 23 '16 at 9:58
@BharadwajRaju: wouldn'tapt purge
show me the dependencies? - and allow me to make up my mind (in my casesamba
would be a problematic package to remove for instance)
– WoJ
Apr 23 '16 at 10:00
2
2
What exactly do you mean by "clean way"? Python2 is only installed if some of the packages need it. Removing it might break the system.
– mikewhatever
Apr 23 '16 at 9:36
What exactly do you mean by "clean way"? Python2 is only installed if some of the packages need it. Removing it might break the system.
– mikewhatever
Apr 23 '16 at 9:36
@mikewhatever: I did an upgrade from 15.10 where Python 2 was needed by the system. Since 16.04 does not ship it at all it means it is not needed anymore. So removing Python 2 should not break the system - which is what I fear the most. As for extra software - it does not matter if they break (I will remove them as well in that case)
– WoJ
Apr 23 '16 at 9:39
@mikewhatever: I did an upgrade from 15.10 where Python 2 was needed by the system. Since 16.04 does not ship it at all it means it is not needed anymore. So removing Python 2 should not break the system - which is what I fear the most. As for extra software - it does not matter if they break (I will remove them as well in that case)
– WoJ
Apr 23 '16 at 9:39
Well, good luck then. :~)
– mikewhatever
Apr 23 '16 at 9:46
Well, good luck then. :~)
– mikewhatever
Apr 23 '16 at 9:46
3
3
However, many apps still need it. Maybe the update installed something requiring
python2
? I'd say don't remove it.– UniversallyUniqueID
Apr 23 '16 at 9:58
However, many apps still need it. Maybe the update installed something requiring
python2
? I'd say don't remove it.– UniversallyUniqueID
Apr 23 '16 at 9:58
@BharadwajRaju: wouldn't
apt purge
show me the dependencies? - and allow me to make up my mind (in my case samba
would be a problematic package to remove for instance)– WoJ
Apr 23 '16 at 10:00
@BharadwajRaju: wouldn't
apt purge
show me the dependencies? - and allow me to make up my mind (in my case samba
would be a problematic package to remove for instance)– WoJ
Apr 23 '16 at 10:00
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
15
down vote
accepted
As there are still a lot of packages that depend on Python2 (like Samba and VirtualBox) you should have a close look at the packages that apt wants to remove before you let it proceed.
Use
sudo apt purge python2.7-minimal
to completely remove Python2 and everything that depends on it.
I just did it, and many things got uninstalled. So far the only I'm missing is "duplicity", so my deja-dup backup copies are now broken because deja-dup relies on duplicity. It seems there's still not a duplicity version that supports python 3, and they keep doing changes with python 2.7, so it's unlikely it's going to be one anywhere in the near future. It's somehow a shame because deja-dup is the default backup system in Ubuntu.
– Fran Marzoa
May 13 '17 at 14:35
JFTR, the pulseaudio-equalizer also seem to depend on Python2 still...
– Fran Marzoa
May 14 '17 at 10:09
Calibre ebook application also depends on python 2.7
– Fran Marzoa
May 16 '17 at 7:42
The Gimp also depends on python 2.7
– Fran Marzoa
May 21 '17 at 21:30
2
I read the comment too late....
– fabio.sang
Apr 25 at 20:35
|
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
15
down vote
accepted
As there are still a lot of packages that depend on Python2 (like Samba and VirtualBox) you should have a close look at the packages that apt wants to remove before you let it proceed.
Use
sudo apt purge python2.7-minimal
to completely remove Python2 and everything that depends on it.
I just did it, and many things got uninstalled. So far the only I'm missing is "duplicity", so my deja-dup backup copies are now broken because deja-dup relies on duplicity. It seems there's still not a duplicity version that supports python 3, and they keep doing changes with python 2.7, so it's unlikely it's going to be one anywhere in the near future. It's somehow a shame because deja-dup is the default backup system in Ubuntu.
– Fran Marzoa
May 13 '17 at 14:35
JFTR, the pulseaudio-equalizer also seem to depend on Python2 still...
– Fran Marzoa
May 14 '17 at 10:09
Calibre ebook application also depends on python 2.7
– Fran Marzoa
May 16 '17 at 7:42
The Gimp also depends on python 2.7
– Fran Marzoa
May 21 '17 at 21:30
2
I read the comment too late....
– fabio.sang
Apr 25 at 20:35
|
show 2 more comments
up vote
15
down vote
accepted
As there are still a lot of packages that depend on Python2 (like Samba and VirtualBox) you should have a close look at the packages that apt wants to remove before you let it proceed.
Use
sudo apt purge python2.7-minimal
to completely remove Python2 and everything that depends on it.
I just did it, and many things got uninstalled. So far the only I'm missing is "duplicity", so my deja-dup backup copies are now broken because deja-dup relies on duplicity. It seems there's still not a duplicity version that supports python 3, and they keep doing changes with python 2.7, so it's unlikely it's going to be one anywhere in the near future. It's somehow a shame because deja-dup is the default backup system in Ubuntu.
– Fran Marzoa
May 13 '17 at 14:35
JFTR, the pulseaudio-equalizer also seem to depend on Python2 still...
– Fran Marzoa
May 14 '17 at 10:09
Calibre ebook application also depends on python 2.7
– Fran Marzoa
May 16 '17 at 7:42
The Gimp also depends on python 2.7
– Fran Marzoa
May 21 '17 at 21:30
2
I read the comment too late....
– fabio.sang
Apr 25 at 20:35
|
show 2 more comments
up vote
15
down vote
accepted
up vote
15
down vote
accepted
As there are still a lot of packages that depend on Python2 (like Samba and VirtualBox) you should have a close look at the packages that apt wants to remove before you let it proceed.
Use
sudo apt purge python2.7-minimal
to completely remove Python2 and everything that depends on it.
As there are still a lot of packages that depend on Python2 (like Samba and VirtualBox) you should have a close look at the packages that apt wants to remove before you let it proceed.
Use
sudo apt purge python2.7-minimal
to completely remove Python2 and everything that depends on it.
edited Aug 23 at 16:51
Community♦
1
1
answered Apr 23 '16 at 10:16
Florian Diesch
64k16160177
64k16160177
I just did it, and many things got uninstalled. So far the only I'm missing is "duplicity", so my deja-dup backup copies are now broken because deja-dup relies on duplicity. It seems there's still not a duplicity version that supports python 3, and they keep doing changes with python 2.7, so it's unlikely it's going to be one anywhere in the near future. It's somehow a shame because deja-dup is the default backup system in Ubuntu.
– Fran Marzoa
May 13 '17 at 14:35
JFTR, the pulseaudio-equalizer also seem to depend on Python2 still...
– Fran Marzoa
May 14 '17 at 10:09
Calibre ebook application also depends on python 2.7
– Fran Marzoa
May 16 '17 at 7:42
The Gimp also depends on python 2.7
– Fran Marzoa
May 21 '17 at 21:30
2
I read the comment too late....
– fabio.sang
Apr 25 at 20:35
|
show 2 more comments
I just did it, and many things got uninstalled. So far the only I'm missing is "duplicity", so my deja-dup backup copies are now broken because deja-dup relies on duplicity. It seems there's still not a duplicity version that supports python 3, and they keep doing changes with python 2.7, so it's unlikely it's going to be one anywhere in the near future. It's somehow a shame because deja-dup is the default backup system in Ubuntu.
– Fran Marzoa
May 13 '17 at 14:35
JFTR, the pulseaudio-equalizer also seem to depend on Python2 still...
– Fran Marzoa
May 14 '17 at 10:09
Calibre ebook application also depends on python 2.7
– Fran Marzoa
May 16 '17 at 7:42
The Gimp also depends on python 2.7
– Fran Marzoa
May 21 '17 at 21:30
2
I read the comment too late....
– fabio.sang
Apr 25 at 20:35
I just did it, and many things got uninstalled. So far the only I'm missing is "duplicity", so my deja-dup backup copies are now broken because deja-dup relies on duplicity. It seems there's still not a duplicity version that supports python 3, and they keep doing changes with python 2.7, so it's unlikely it's going to be one anywhere in the near future. It's somehow a shame because deja-dup is the default backup system in Ubuntu.
– Fran Marzoa
May 13 '17 at 14:35
I just did it, and many things got uninstalled. So far the only I'm missing is "duplicity", so my deja-dup backup copies are now broken because deja-dup relies on duplicity. It seems there's still not a duplicity version that supports python 3, and they keep doing changes with python 2.7, so it's unlikely it's going to be one anywhere in the near future. It's somehow a shame because deja-dup is the default backup system in Ubuntu.
– Fran Marzoa
May 13 '17 at 14:35
JFTR, the pulseaudio-equalizer also seem to depend on Python2 still...
– Fran Marzoa
May 14 '17 at 10:09
JFTR, the pulseaudio-equalizer also seem to depend on Python2 still...
– Fran Marzoa
May 14 '17 at 10:09
Calibre ebook application also depends on python 2.7
– Fran Marzoa
May 16 '17 at 7:42
Calibre ebook application also depends on python 2.7
– Fran Marzoa
May 16 '17 at 7:42
The Gimp also depends on python 2.7
– Fran Marzoa
May 21 '17 at 21:30
The Gimp also depends on python 2.7
– Fran Marzoa
May 21 '17 at 21:30
2
2
I read the comment too late....
– fabio.sang
Apr 25 at 20:35
I read the comment too late....
– fabio.sang
Apr 25 at 20:35
|
show 2 more comments
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f761106%2fhow-to-remove-python-2-in-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
What exactly do you mean by "clean way"? Python2 is only installed if some of the packages need it. Removing it might break the system.
– mikewhatever
Apr 23 '16 at 9:36
@mikewhatever: I did an upgrade from 15.10 where Python 2 was needed by the system. Since 16.04 does not ship it at all it means it is not needed anymore. So removing Python 2 should not break the system - which is what I fear the most. As for extra software - it does not matter if they break (I will remove them as well in that case)
– WoJ
Apr 23 '16 at 9:39
Well, good luck then. :~)
– mikewhatever
Apr 23 '16 at 9:46
3
However, many apps still need it. Maybe the update installed something requiring
python2
? I'd say don't remove it.– UniversallyUniqueID
Apr 23 '16 at 9:58
@BharadwajRaju: wouldn't
apt purge
show me the dependencies? - and allow me to make up my mind (in my casesamba
would be a problematic package to remove for instance)– WoJ
Apr 23 '16 at 10:00