Package References
sow rm, sow show, and sow where all take a PACKAGE argument. This page defines
what you may write there. The same grammar applies to all three commands; only the
handling of an ambiguous name differs.
Nothing here applies to sow add, which takes filesystem paths, not references.
The five forms
| Form | Example | Matches |
|---|---|---|
| Content digest | sha256:d06d7f23b9cf...b98b1229 |
Exactly one package object |
| RPM coordinate | rpm:pev2-0:1.23.0-1.noarch |
Exactly one RPM |
| DEB coordinate | deb:libpq5=18.3-1.pgdg12+1:amd64 |
Exactly one DEB |
| Filename | pev2-1.23.0-1.noarch.rpm |
The package stored under that filename |
| Bare name | pev2 |
Every version and architecture of that name |
The first three are exact: they name one object and either hit it or fail. The last two are conveniences that may match more than one object.
You never have to construct these by hand. sow ls prints the digest and the coordinate
of every package, in a form you can paste straight back into another command:
Content digest
The SHA-256 of the complete stored package bytes. This is the strongest reference SOW has: it is the object’s identity, so it can never be ambiguous.
The digest must be complete and lowercase. There is no prefix matching and no case-folding — a short or uppercase digest is a usage rejection, not a failed lookup:
Note that this digest covers the bytes as stored. If a repository re-signs RPM
payloads, the digest of the object differs from the digest of the file you handed to
sow add.
RPM coordinate
The full NEVRA, prefixed with rpm:. Every component is required, including the epoch —
0 when the package has none.
Quote it in a shell: NEVRA contains a colon, and history expansion or path completion can otherwise mangle it.
Both the prefix and the epoch are load-bearing. Dropping either turns the string into a bare-name lookup that finds nothing:
The architecture component is the one from the RPM header: x86_64, aarch64, or
noarch. It is not the canonical family — a noarch package is written noarch here,
even though SOW classifies it internally as neutral.
DEB coordinate
The Debian identity triple, prefixed with deb:. The version is the complete Debian
version including epoch and revision; the architecture is the ecosystem name (amd64,
arm64, all), not the canonical family.
All three parts are required. deb:libpq5=18.3-1.pgdg12+1 without an architecture does
not match anything.
Filename
The complete filename of the package as stored, including the extension:
This is the easiest form to type when you are looking at a directory listing. It is not an identity, though: filename is not what SOW uses to tell packages apart, and two distinct objects could in principle carry the same name. Prefer a coordinate or a digest in scripts.
Bare name
Just the binary package name:
What this means depends on the command:
-
sow rmtreats it as every version and native architecture of that name in the selected distributions. This is intentional — removing a package usually means removing all of it. Preview first with-c: -
sow showandsow whererequire it to identify exactly one object. They describe a single package, so a name matching several is refused with the candidate list:Every candidate is printed with both its coordinate and its digest, so the fix is to copy one of them back onto the command line.
What does not work
A NEVRA without the rpm: prefix looks like a coordinate but is parsed as a bare name,
and bare names do not contain epochs or architectures:
There is also no glob, no regex, no version range, and no --all flag. If you want to
select a set of packages by pattern, that is membership policy
in sow.yml, not a command-line selector. The command line only ever names packages that
already exist.
Scope
A reference is resolved within a scope, and the scope is set by the usual selection flags, not by the reference:
| Command | Default scope | Narrow with |
|---|---|---|
sow rm |
The selected distributions of the selected repository | -r, -d (required when several exist) |
sow show |
The selected repository | -r, -d |
sow where |
Every repository in the workspace | -r, -d |
sow where is the one that searches broadly — use it when you know a package exists
somewhere but not where. sow show describes one object in one repository in full detail.
The two commands also word their misses differently, which tells you which one you ran:
Coordinates and identity
The coordinate forms above are the logical identity of a package, and SOW enforces that
one coordinate maps to at most one content object inside a repository. Adding a different
file under a coordinate that already exists is a hard conflict — SOW will not silently
pick a winner, and there is no --replace.
Two packages that differ only in signature therefore still collide, because the coordinate
is the same. If you re-sign a package for real, bump its release; if you are re-adding the
identical input, SOW recognizes it and reports reused.
See also
sow rm— removal, preview, and batch semanticssow ls,show, andwhere— the query commands- Exit Codes —
6covers both “no match” and “ambiguous”