How to find out where the contents of a package are installed

aptpackage-management

I ran into this bug, where Cantor can't find the sage backend if both are installed through the ubuntu package system. I can get around this bug if I know the path to the sage executable, but even after installing cantor-backend-sage I can't figure out where sage is located. locate and find both return loads of files called message-something, and have been unhelpful. which sage and whereis sage return nothing.

Is there some way to figure out where apt-get installs everything in a package?

Best Answer

Which files were installed by package? dpkg -L package.
Which files will package install? apt-file list -F package.

Also the other direction is possible:

Which package installed this file? dpkg -S file
Which package do I need to install for file? apt-file search file.

Related Question