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*
2
  • 6
    I think you are fortunate it failed. Had it worked, it would have installed over 5400 packages. – user535733 Apr 30 '20 at 13:41
  • thank you for suggestion – Newtron Malayalam Apr 30 '20 at 13:58
9

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).
4
  • 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 7:08
  • apt-get works with * – Example person Sep 17 '20 at 7: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.

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.