.rpm location on Fedora 26?

Posted on

Problem :

I downloaded an .rpm file to my ~/Downloads directory and successfully installed it by double clicking on it: Software opened and I could click on ‘Install’. Simple and very convenient, but I would like to learn more about the system and where files are (supposed to be) stored.

My question is: Can I now safely delete the ~/Downloads/file.rpm file or should I move it to another location on my system? Or am I supposed to forever leave it in its current directory…?

If it is of any useful information: I don’t have any /var/cache/yum/ on my system and I don’t have anything related to file.rpm in /var/cache/dnf/. Also, no /etc/yum.conf, /ect/dnf.conf or anything related to file.rpm in /etc/yum.repos.d/.

Thank you very much for your comments!

Solution :

Once the package is installed, the various files will go into their appropriate locations on the filesystem according to Fedora’s guidelines for filesystem layout. Once you’ve installed a downloaded package, you can remove the RPM file.

You can see where a package is going to put stuff before installing it from the command line. Let’s assume your downloaded package is foo-1.0-1.x86_64.rpm, and it’s in ~/Downloads. You can see what’s in it by running:

$ rpm -qlp ~/Downloads/foo-1.0-1.x86_64.rpm

Where qlp is “query: list files from a packagefile”. Look at man rpm for many other query options.

You can also use the less pager to see details about a package (it runs an RPM query command in the background), like this:

$ less ~/Downloads/foo-1.0-1.x86_64.rpm

First, you’ll see some overview information, then a description, then a (possibly very long) changelog, and finally at the bottom, the file list. (Hit q when you are done with less.)

Leave a Reply

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