# RPM names do not match their contents

**URL:** https://discuss.elastic.co/t/rpm-names-do-not-match-their-contents/193782
**Category:** Beats
**Tags:** filebeat
**Created:** [August 5, 2019, 11:32am UTC](https://discuss.elastic.co/t/rpm-names-do-not-match-their-contents/193782 "2019-08-05T11:32:14Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![jordansissel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordansissel/32/44957_2.png) [@jordansissel](https://discuss.elastic.co/u/jordansissel)
#### Post date: [September 3, 2019, 7:46pm UTC](https://discuss.elastic.co/t/rpm-names-do-not-match-their-contents/193782/8 "2019-09-03T19:46:00Z")

</div>

> It is kind of urgent for us at the moment

Maybe we can help you find a workaround in the meantime? As you've noted, rpm does not require anything particular about the rpm file name itself.

Can you describe your process for how you take the output of `rpm -qa ...` and use it to find a special file?

As a workaround: you can rename the file if you wish giving it any name you like. Here's an example that takes an rpm file named "fancy.file" and renames it to name-version-release.arch.rpm:

```auto
% file fancy.file
fancy.file: RPM v3.0 bin i386/x86_64

% rpm -qp fancy.file
example-1.0-1.x86_64

% mv -v fancy.file "$(rpm -qp fancy.file).rpm"
renamed 'fancy.file' -> 'example-1.0-1.x86_64.rpm'

% rpm -qp example-1.0-1.x86_64.rpm
example-1.0-1.x86_64

```

Here's an example automatically naming filebeat however you like based on the package metadata:

```auto
% wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.3.1-x86_64.rpm
...
% mv -v filebeat-7.3.1-x86_64.rpm "$(rpm -qp filebeat-7.3.1-x86_64.rpm).rpm"
renamed 'filebeat-7.3.1-x86_64.rpm' -> 'filebeat-7.3.1-1.x86_64.rpm'

```

Hope this helps.

---

_[View the full topic](https://discuss.elastic.co/t/rpm-names-do-not-match-their-contents/193782)._
