Free RPM test files and sample generator

The package format for Red Hat, Fedora and derivatives. Generate valid .rpm sample files to test package tooling, repository scanners and upload handling.

Generate a .rpm file →

What is a .rpm file?

RPM: Red Hat Package Manager. An RPM package carries its metadata in tagged header sections, name, version, license, dependencies, followed by a compressed cpio archive holding the files themselves. Package managers read the headers without touching the payload, which is how a repository can index thousands of packages cheaply.

Why generate a test RPM file?

How a .rpm file is identified

Every .rpm file begins with ED AB EE DB, the RPM lead magic. That is what a validator inspecting content rather than the file name looks for.

Negative testing with broken RPM files

Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.

Sample RPM content

[RPM], 96-byte lead + signature header + tagged header + gzip-compressed cpio payload.

This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.

How to open and verify the file

Query metadata with `rpm -qip file.rpm` and list files with `rpm -qlp file.rpm`. `tar -tvf file.rpm` reads the payload via libarchive's rpm filter, including on Windows.

Media type application/x-rpm · extension .rpm · category Scripts & OS

Generate a .rpm file → · questions about sizes, privacy or cost are answered on the site FAQ.

Frequently asked questions about RPM files

What identifies a .rpm file?

A .rpm file begins with the bytes ED AB EE DB, the RPM lead magic. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.

Can I download several broken RPM files at once?

Yes, select more than one File Condition and you get one ZIP containing a .rpm per condition, each named after its condition.

Can the RPM file use UTF-16 or a byte-order mark?

No, and deliberately. A .rpm file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.

How do I open or verify the RPM file?

Query metadata with rpm -qip file.rpm and list files with rpm -qlp file.rpm. tar -tvf file.rpm reads the payload via libarchive's rpm filter, including on Windows.

Related Scripts & OS formats

SH · BAT · PS1 · VBS · DEB · PKG · APK · AAB

Browse all file formats →