How to Install and Uninstall python2 Package on Ubuntu 22.04 LTS (Jammy Jellyfish)

Last updated: May 15,2024

1. Install "python2" package

Please follow the guidance below to install python2 on Ubuntu 22.04 LTS (Jammy Jellyfish)

$ sudo apt update $ sudo apt install python2

2. Uninstall "python2" package

This tutorial shows how to uninstall python2 on Ubuntu 22.04 LTS (Jammy Jellyfish):

$ sudo apt remove python2 $ sudo apt autoclean && sudo apt autoremove

3. Information about the python2 package on Ubuntu 22.04 LTS (Jammy Jellyfish)

Package: python2
Architecture: amd64
Version: 2.7.18-3
Multi-Arch: allowed
Priority: optional
Section: universe/python
Source: python-defaults
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Matthias Klose
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 69
Provides: python-ctypes, python-email, python-importlib, python-profiler, python-wsgiref
Pre-Depends: python2-minimal (= 2.7.18-3)
Depends: python2.7 (>= 2.7.18~), libpython2-stdlib (= 2.7.18-3)
Suggests: python2-doc (= 2.7.18-3), python-tk (>= 2.7.18~)
Conflicts: python-central (<< 0.5.5)
Breaks: python (<< 2.7.15-2), python2-doc (<< 2.7.18-2), update-manager-core (<< 0.200.5-2)
Replaces: python (<< 2.7.15-2), python-dev (<< 2.6.5-2), python2-doc (<< 2.7.18-2)
Filename: pool/universe/p/python-defaults/python2_2.7.18-3_amd64.deb
Size: 9098
MD5sum: f31fe1f283b8142caa8d5dc45decc84a
SHA1: ac69625c0e8160aab9ea43ebf311c71ee94efe57
SHA256: f7edbf5601d60f8771f95e15192199f1f6ae9a6d2ed2803b25f20d511d7fcf6a
SHA512: 250d353c42f881261a4f3aa923a25d10e901a8b7df415412285c57c396be5d32aff826ca43d70f4c28927950567a597c1537656ada9ea91b3fa407835acbc0d9
Homepage: https://www.python.org/
Description: interactive high-level object-oriented language (Python2 version)
Description-md5: 8a23c719c291789e6e4e8971b03680c5