Is there any way to make yum/rpm never install a particular file path, but to otherwise install any packages which contain that file path, and for verification to act as if that file exists? For example, a certain package puts a file in /etc/cron.daily that I don't want. I figured out a hack for that particular issue, but it seems like it might be something that could come in handy in other circumstances.

EDIT: I tried using RPM filetriggers to delete the file right after it was installed, but it didn't do anything. Plus it would probably have failed the yum verification step.


1 Answer 1


Use the --excludepath= option, for instance if you have this kind of error:

$ sudo rpm -i chromium-27.0.1453.110-202711.x86_64.rpm
error: unpacking of archive failed on file /usr/share/applications/chromium-devel.desktop;569df493: cpio: open failed - Permission denied

you can use the option like this:

$ sudo rpm -i chromium-27.0.1453.110-202711.x86_64.rpm --excludepath=/usr/share/applications/chromium-devel.desktop
# works ok

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.