(still) on Ubuntu 20.04.6 LTS

when I try to install flake8, it makes me question, which implies I do something very risky, however I can not find, is it actually risk or it's just outdated warning for presence of minimal Python 2.x on platform

If I want to have system-wide flake8 in /usr/bin - what risks I face if python-minimal is removed, provided there is also installed python3-minimal and it's not about to be removed?

$ sudo apt install flake8

Reading package lists... Done

Building dependency tree
Reading state information... Done

The following additional packages will be installed:

libpython2-stdlib pyflakes pyflakes3 python-pkg-resources python-pyflakes python2 python2-minimal python3-flake8 python3-pyflakes

Suggested packages:

python-setuptools python2-doc python-tk

The following packages will be REMOVED: python-minimal

The following NEW packages will be installed:

flake8 libpython2-stdlib pyflakes pyflakes3 python-pkg-resources python-pyflakes python2 python2-minimal python3-flake8 python3-pyflakes

WARNING: The following essential packages will be removed.

This should NOT be done unless you know exactly what you are doing!


0 upgraded, 10 newly installed, 1 to remove and 0 not upgraded. Need to get 352 kB of archives. After this operation, 1,700 kB of additional disk space will be used.

You are about to do something potentially harmful.

To continue type in the phrase 'Yes, do as I say!'

updated on request:

$ apt list python3-minimal

Listing... Done

python3-minimal/focal,now 3.8.2-0ubuntu2 amd64 [installed]

python3-minimal/focal 3.8.2-0ubuntu2 i386

(update - more info on request)

$ apt policy flake8


Installed: (none)

Candidate: 3.7.9-2

Version table:

3.7.9-2 500

   500 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

   500 http://fi.archive.ubuntu.com/ubuntu focal/universe i386 Packages
  • Why are you removing python-minimal - it will break your system ? Are you following some guide ?
    – Soren A
    Commented Jun 15 at 13:55
  • @SorenA I'm not removing, I faced implied warning and wonder - if I follow this path, what happens. People don't put warnings for nothing. On the other hand, if installing flake8 causes this stir, is it flake8 problem then?
    – aytvill
    Commented Jun 15 at 13:59
  • oh, sorry, it was wrong quote, I have to fix text in post
    – aytvill
    Commented Jun 15 at 14:00
  • @SorenA now it's corrected text with actual quote. I have tried also start but not to finish removal of python-minimal to see whether it will lead to removal of python3-minimal
    – aytvill
    Commented Jun 15 at 14:05
  • @user535733 is there way to debug without posting my 45-long /etc/apt/sources.d ? apt-cache show python-minimal says it is... Version: 2.7.3-0ubuntu2.2+srt2
    – aytvill
    Commented Jun 15 at 14:22

1 Answer 1


The python-minimal package was removed from Ubuntu before 20.04 as part of the migration from Python2 to Python3.

Perhaps yours is still there as a legacy of an earlier version of Ubuntu.

20.04 (and newer) systems don't use Python2 under the hood.

If you're not using Python2 applications on your 20.04 (or newer) system, then all Python2-related packages, including python-minimal can be safely removed.

DON'T remove python3-minimal. It's a key component of your Ubuntu system. Its removal would be very, very bad.

  • yes, you are right - this is long running 20.04 laptop, and python2.7 is gone ages ago, so it's probably packet stuck. I have installed flake8 and don't see any side effects, at least for now. Thank you. I can not upvote original post or this solution, but marked it as solution for my question.
    – aytvill
    Commented Jun 15 at 14:53
  • I think it lngered for a while after 18.04 but named as python2-minimal IIRC … But, as you state in your answer Python3 is what’s included and used now.
    – Raffa
    Commented Jun 15 at 17:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .