RPMSORT(1) General Commands Manual RPMSORT(1)

# [NAME](#NAME)

rpmsort - Sort input by RPM Package Manager (RPM) versioning

# [SYNOPSIS](#SYNOPSIS)

**rpmsort** \[ *FILE* ... ]

# [DESCRIPTION](#DESCRIPTION)

[**rpmsort**(1)](/man/os/rpm/rpmsort.1) sorts the content of the input files, and writes a sorted list to standard out - like [**sort**(1)](/man/os/rpm/sort.1), but aware of RPM versioning.

# [ARGUMENTS](#ARGUMENTS)

*FILE*

A text-file containing lines to sort. If *FILE* is omitted or **-** given, data is read from standard in and written to standard out.

# [OPTIONS](#OPTIONS)

**rpmsort** has no options.

# [EXIT STATUS](#EXIT_STATUS)

On success, 0 is returned, a nonzero failure code otherwise.

# [EXAMPLES](#EXAMPLES)

**echo -e 'rpm-4.18.0-3.fc38.x86\_64\\nrpm-4.18.0-1.fc38.x86\_64' | rpmsort**

```
rpm-4.18.0-1.fc38.x86_64
rpm-4.18.0-3.fc38.x86_64
```

# [SEE ALSO](#SEE_ALSO)

[**rpm-version**(7)](/man/os/rpm/rpm-version.7)

2026-08-31 RPM 6.1.0

---

Document: rpmsort(1) from rpm 6.1.0-r1 (Chainguard OS)
Source: https://github.com/rpm-software-management/rpm
