Find out which package a file belongs to on Ubuntu

ubuntu_apps_compIn a previous post I wrote about how to know which files are installed by a package. Here’s the reverse of that – how to detect which package installed a particular file. dpkg -S does that. I was looking for a way to know which package the process gnome-pty-helper belongs to when I googled it out.

$ dpkg -S gnome-pty-helper
libvte-2.90-9: /usr/lib/libvte-2.90-9/gnome-pty-helper

dpkg -S searches for the pattern. So it’s advisable to use the absolute path to the file for more accurate results.

Leave a Reply

Your email address will not be published. Required fields are marked *