Problem using wildcard with apt

Recent versions of apt changed the way patterns are specified, and apt no longer supports regular expressions directly or wildcards, other than * for which support was restored in 2.1.0 and backported to 2.0.3.

You should now use

apt install '~nlibkf5.*'

with apt between 1.9.9 and 2.0.2, or the long form

apt install '?name(libkf5.*)'

available slightly earlier.

See the apt-patterns manpage (man apt-patterns) for details.


One can still use plain apt-get for such purpose.

For the OP's example it will look like

sudo apt-get install "libkf5*"