2
apt list --installed

The above command will list all installed apps which is usually more than 100 but I need to see all apps that start with a specific word

Example:
I have installed more than 2 wine versions and I want to uninstall them but when I write apt list --installed, even scrolling to reach the top is time consuming so I want some way to make this list smaller like the command ls win* in directories

Note: I'm using Ubuntu 21

2 Answers2

9

apt list --installed | grep wine should do what you want.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • 2
    Or apt list --installed '*wine*' – gronostaj Aug 16 '21 at 05:31
  • Yeay it worked tones of tnx but I have installed multiple times of one package and I wanna delete them, is there any specific command for it? like '''appwiz.cpl''' in windows/run which come up with list of all installed programs so user could modify them ? – Besmella Kazimy Aug 16 '21 at 06:35
5

Since apt version 1.8, you can use aptitude style patterns to narrow searches involving package names. So for example

apt list '?narrow(?installed,?name(wine))'

or (using the ~i and ~n shorthands for ?installed and ?name)

apt list '?narrow(~i,~nwine)'

See also:

and related quetion

steeldriver
  • 136,215
  • 21
  • 243
  • 336