6

I was trying to install all python packages using sudo apt install python3*, but it gave me this error:

newtron@newtron:~$ sudo apt install python3*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3*
Zanna
  • 70,465

2 Answers2

10

Ubuntu 20.04 introduced Apt 2.0

From the Release Notes:

New Features

  • Commands accepting package names now accept aptitude-style patterns. The syntax of patterns is mostly a subset of aptitude, see apt-patterns(7) for more details.

Incompatibilities

  • The apt(8) command no longer accepts regular expressions or wildcards as package arguments, use patterns (see New Features).
user535733
  • 62,253
  • 3
    so what is the replacement or alternative for it. – Newtron Malayalam Apr 30 '20 at 14:02
  • 1
    Replacement: "mostly a subset of aptitude, see apt-patterns(7) for more details" – user535733 Apr 30 '20 at 15:11
  • @NewtronMalayalam The closer I can see is the regex pattern for package names. For example if you have multiple kernel installed, and you want to remove in one command everything related to a particular version, you can use sudo apt autoremove --purge ~n.*5.6.10.* You can see the .* regular regex. I like this new approach a lot, it's way more flexibile once you get it! – Matteo Iervasi May 21 '20 at 07:08
  • apt-get works with * – Example person Sep 17 '20 at 07:34
6

I have reported this as bug to launchpad - https://bugs.launchpad.net/bugs/1860366 against Ubuntu 20.04 LTS.

You can still use apt-get for this purpose:

sudo apt-get install "python3*"

will do what you (and really me) want. We need to change our habits here.

Eliah Kagan
  • 117,780
N0rbert
  • 99,918