0

I would like to file a bug against an Ubuntu package. But I don't know the package name. Everything I've tried that was suggested ends up showing "ubuntu-bug package not installed".

Which command could I use to find the package?

1 Answers1

1

You can use apt-cache search to search for packages related to a search term. For example, if I want to search for packages related to ALSA, you would run the following command:

apt-cache search alsa

You can even add multiple search terms like in this example:

apt-cache search alsa tools

And you can filter the results using grep. For example, to limit the results to only those that contain "alsa":

apt-cache search alsa tools | grep "alsa"

Alternatively, you can list all installed packages using the dpkg -l command:

dpkg -l

and you can filter the results limited to a search term:

dpkg -l | grep alsa

or you can disable case sensitivity using the -i option:

dpkg -l | grep -i alsa

and for multiple search terms, like "alsa" OR "driver", for example:

dpkg -l | grep -i "alsa\|driver"

and you can also use grep to filter the output of grep to search for two or more terms like "alsa" AND "driver", for example:

dpkg -l | grep -i "alsa" | grep "driver"

You can also use pgrep to list running processes based on a search term. This will give you the process command that is running and then that can be used to track down the package name.

For example, if you are running firefox nightly but can't remember the exact name, you could search for firefox when the application is running:

pgrep -a firefox

and it should return:

firefox-nightly

As described in the linked question, "how do I find the package that provides a file", you can use dpkg -S to search for the package based on the command returned from pgrep.

dpkg -S firefox-nightly

Package names will be listed in the first column on the left.

Unlike other solutions to find packages based on file names like apt-file, dpkg -S is limited to packages that are installed.


Lastly, you could always run htop in the terminal and then press f3 to search for running processes. Press f3 additional times to go through all the results.

mchid
  • 44,904
  • 8
  • 102
  • 162