Ubuntu – How to get a list of files for a package I haven’t installed yet

aptapt-cachecommand linedpkg

apt-cache search returns list of available packages. In my case I would like to look at the list of files that would be installed on my PC in case I install the package usb-creator-gtk.

Something like dpkg-query -L does for an already installed package.

Thanks for help.

Best Answer

You've got at least these two options.

First one, use apt-file for packages you haven't installed yet.

$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file list usb-creator-gtk
usb-creator-gtk: /usr/bin/usb-creator-gtk
usb-creator-gtk: /usr/lib/python2.7/dist-packages/usbcreator/frontends/gtk/__init__.py
usb-creator-gtk: /usr/lib/python2.7/dist-packages/usbcreator/frontends/gtk/frontend.py
[...]

Second one, use the packages.ubuntu.com website to locate the package, then all the way down on the page in the "Download" section, you'll find a link [list of files]. Example for your package in Bionic (18.04) is here.

Either way, please remember that packages might install more files in their install scripts!