---
name: "pacsort"
section: "8"
platform: "linux"
package: "pacman-contrib"
version: "1.13.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pacsort"
---

# pacsort(8)

sort utility implementing alpm\_pkg\_vercmp

## NAME

pacsort - sort utility implementing alpm\_pkg\_vercmp

## SYNOPSIS

*pacsort* \[options\] \[files ...\]

## DESCRIPTION

*pacsort* concatenates the given files, sorts them, and writes them to standard output. Default order is oldest to newest.

Standard input is read when no files are given.

By default the lines are treated as lists of plain version strings.

## OPTIONS

- **-f, --files**

  If the input lists are in the format *\*-\*.pkg.tar\**, sort lines by pkgname and pkgver.

- **-h, --help**

  Display syntax and command-line options.

- **-k, --key \<index\>**

  Sort the input starting on the specified column.

- **-z, --null**

  Lines end with null bytes rather than newlines.

- **-r, --reverse**

  Sort in reverse order.

- **-t, --separator \<sep\>**

  Field separator. Default separator is space.

- **-V, --version**

  Display the version.

## SEE ALSO

[**pacman**(8)](/pacman/8.md), [**vercmp**(8)](/vercmp/8.md)

## BUGS

Bugs? You must be kidding; there are no bugs in this software. But if we happen to be wrong, file an issue with as much detail as possible at https://gitlab.archlinux.org/pacman/pacman-contrib/-/issues/new.

## AUTHORS

Current maintainers:

• Johannes Löthberg \<johannes@kyriasis.com\>

• Daniel M. Capella \<polyzen@archlinux.org\>

For additional contributors, use git shortlog -s on the pacman-contrib.git repository.
