Score:0

Purge or remove suggesting to remove XXX unrelated packages

cn flag

I am trying to remove python but I am being told it will remove almost all my packages install (exaggeration). How can I just remove python 3.8 and not all the other packages?

hutber@hutber:/var/www$ sudo apt-get purge python3.8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libexpat1-dev libgsf-bin libmspack0 libpython3-dev libpython3.8-dev libxmlsec1-openssl python-pip-whl zerofree zlib1g-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libutempter0 xterm
Suggested packages:
  xfonts-cyrillic
The following packages will be REMOVED:
  apparmor* apt-clone* aptdaemon* apturl* apturl-common* blueberry* bulky* caribou* celluloid* cinnamon* cinnamon-common* cinnamon-control-center* cinnamon-control-center-dbg*
  cinnamon-dbg* cinnamon-desktop-data* cinnamon-screensaver* cinnamon-session* cinnamon-settings-daemon* command-not-found* dkms* drawing* firefox* foomatic-db-compressed-ppds*
  gdebi* gdebi-core* gir1.2-cinnamondesktop-3.0* gir1.2-meta-muffin-0.0* gir1.2-xapp-1.0* gnome-menus* gnome-online-accounts* gnome-terminal* gufw* gvfs-backends* hplip*
  hplip-data* hypnotix* libcinnamon-desktop-dbg* libcinnamon-desktop4* libmpv1* libsmbclient* libxapp1* lightdm-settings* lsb-release* mint-common* mint-meta-cinnamon*
  mint-meta-core* mintbackup* mintdrivers* mintinstall* mintlocale* mintmenu* mintreport* mintsources* mintstick* mintsystem* mintupdate* mintwelcome* nemo* nemo-data*
  nemo-dbg* nemo-fileroller* nemo-preview* nemo-share* netplan.io* network-manager-gnome* networkd-dispatcher* nvidia-prime-applet* onboard* onboard-common* open-vm-tools*
  open-vm-tools-desktop* openprinting-ppds* orca* pix* pix-dbg* plymouth-theme-ubuntu-text* printer-driver-foo2zjs* printer-driver-foo2zjs-common* printer-driver-m2300w*
  printer-driver-postscript-hp* printer-driver-ptouch* printer-driver-pxljr* printer-driver-sag-gdi* python3* python3-apport* python3-apt* python3-aptdaemon*
  python3-aptdaemon.gtk3widgets* python3-blinker* python3-brlapi* python3-bs4* python3-cairo* python3-certifi* python3-cffi-backend* python3-chardet* python3-click*
  python3-colorama* python3-commandnotfound* python3-configobj* python3-crypto* python3-cryptography* python3-cups* python3-cupshelpers* python3-dbus* python3-debian*
  python3-defer* python3-dev* python3-distro* python3-distutils* python3-entrypoints* python3-gdbm* python3-gi* python3-gi-cairo* python3-grpcio* python3-httplib2* python3-icu*
  python3-idna* python3-ifaddr* python3-imdbpy* python3-jwt* python3-keyring* python3-launchpadlib* python3-lazr.restfulclient* python3-lazr.uri* python3-ldb* python3-lib2to3*
  python3-linecache2* python3-louis* python3-macaroonbakery* python3-magic* python3-mako* python3-markupsafe* python3-nacl* python3-netaddr* python3-netifaces*
  python3-oauthlib* python3-packaging* python3-pam* python3-parted* python3-pbr* python3-pexpect* python3-pil* python3-pip* python3-pkg-resources* python3-problem-report*
  python3-protobuf* python3-psutil* python3-ptyprocess* python3-pyatspi* python3-pycurl* python3-pyinotify* python3-pymacaroons* python3-pyparsing* python3-reportlab*
  python3-reportlab-accel* python3-requests* python3-requests-file* python3-requests-unixsocket* python3-rfc3339* python3-samba* python3-secretstorage* python3-setproctitle*
  python3-setuptools* python3-simplejson* python3-six* python3-soupsieve* python3-speechd* python3-systemd* python3-talloc* python3-tdb* python3-testresources*
  python3-tinycss2* python3-tldextract* python3-traceback2* python3-tz* python3-unidecode* python3-unittest2* python3-uno* python3-urllib3* python3-wadllib*
  python3-webencodings* python3-wheel* python3-xapp* python3-xdg* python3-xkit* python3-xlib* python3-xlrd* python3-yaml* python3.8* python3.8-dev* redshift-gtk*
  rhythmbox-plugin-tray-icon* rhythmbox-plugins* samba-common-bin* samba-libs* slick-greeter* smbclient* sticky* synaptic* system-config-printer* system-config-printer-common*
  system-config-printer-udev* thingy* timeshift* ubuntu-drivers-common* ubuntu-system-adjustments* ufw* warpinator* webapp-manager* xapps-common* xed* xed-dbg* xfsprogs* xorg*
  xreader* xreader-dbg* xserver-xorg* xviewer* xviewer-dbg* xviewer-plugins* yelp* youtube-dl*
The following NEW packages will be installed:
  libutempter0 xterm
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  mintsources python3-apt (due to mintsources) python3-gi (due to mintsources) python3-gi-cairo (due to mintsources) python3-pycurl (due to mintsources)
  python3-requests (due to mintsources) mint-common (due to mintsources) gir1.2-xapp-1.0 (due to mintsources) lsb-release (due to mintsources)
0 upgraded, 2 newly installed, 222 to remove and 7 not upgraded.
Need to get 773 kB of archives.
After this operation, 512 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] ^C
Artur Meinild avatar
vn flag
**Stop!** What version of Ubuntu are you using? If you're trying to remove the default version of Python that came with your distribution, it's going to be a disaster. Please explain why you would want to mess with Python versions in the first place. Thanks!
cn flag
I wanted to upgrade to 3.9 for code commit as I'm seeing some errors `/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!` But maybe I'm barking up the wrong tree. Its version 20.04
user535733 avatar
cn flag
Python3.8 is required for proper functioning of Ubuntu 20.04. Removal of that particular version of Python3 will destroy the 20.04 system (as apt is correctly telling you). You're going about "upgrading" in the wrong way.
cn flag
Makes sense... as to why its asking to remove so much :D
Artur Meinild avatar
vn flag
Don't do it! If you need alternate Python versions, look into Python virtual environments.
cn flag
Thanks Arthur, unfortunately it does not. I will create a new question then.
Score:1
cn flag

A modern linux desktop is build largely using python. You can remove python, but then you also remove the desktop. There is no way around. You can not remove the foundations without taking down the house as well.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.