Skip to content

Package References

Name a stored package by digest, coordinate, file name, or bare name, and resolve ambiguous or missing matches.

rm, show, and where take a package reference: a string that names one package stored in a standard repository, or every version of a package at once. Look here when a command reports that a reference is ambiguous or matches nothing, or when a script needs a reference that always picks exactly one object. add is different: it takes file or directory paths.

The easiest way to get an exact reference is to copy it from sow ls:

sow ls -r demo -d el9
sow show 'rpm:example-0:1.0-1.x86_64' -r demo

Accepted forms

Form Syntax Matches
SHA-256 sha256:<64 lowercase hex digits> Stored package bytes
RPM coordinate rpm:<name>-<epoch>:<version>-<release>.<arch> Complete RPM identity, including epoch
DEB coordinate deb:<name>=<version>:<arch> Complete DEB identity
File name example-1.0-1.x86_64.rpm Stored package file name
Bare name example Every package with that binary name

Use a coordinate or a full digest in scripts. A file name is a convenience and is not guaranteed to be unique; a bare name deliberately matches several versions. References do not accept paths, globs, regular expressions, or version ranges.

SHA-256. Write all 64 digits in lowercase; an abbreviated or uppercase digest is rejected with exit 6. The digest is of the stored bytes, which RPM package signing can make different from the input file’s digest.

Coordinates. Every component is required, because SOW matches the complete stored coordinate. An RPM coordinate always includes the epoch, 0 when the package has none. A DEB coordinate carries the complete Debian version, with any epoch and revision. The architecture is the package’s own: x86_64, aarch64, or noarch for RPM; amd64, arm64, or all for DEB. The sow.yml aliases do not apply here.

sow where 'rpm:example-0:1.0-1.noarch'
sow where 'deb:example=2:1.0-1:amd64'

Name matching and ambiguity

A bare name can match several versions or architectures. Each command handles that differently:

Command When a bare name matches several packages
rm Removes every match from the selected Dists
show Rejects the reference and lists the candidates
where Requires one package identity, then returns every repository location for it

Preview a name-wide removal before applying it:

sow rm example -r demo -d el9 --check

For show or where, pick a coordinate or digest from the candidate list. where can return several repositories when they hold the same format, coordinate, and SHA-256; if repositories hold different versions or bytes, narrow it with -r or a more specific reference. Every other form must identify one object within a repository. A reference that matches nothing or is ambiguous returns exit 6.

sow prune DIR --protect NAME, used on simple repositories, also takes only an exact binary RPM package name, not a coordinate, digest, or file name.

Search scope

Command Searches Selection
rm Desired membership of the selected Dists in one repository -r; repeatable -d, or an inferred Dist
show Every recorded package object in one repository, including ones no longer in any Dist -r; -d narrows to desired membership of those Dists
where Desired membership in every repository of the workspace Optional -r and -d

Files SOW has not recorded are never query results. If rm cannot infer the Dist and the repository has several, pass -d. Without -r, where -d NAME searches the repositories that have a Dist of that name, and fails if none does.

Coordinate conflicts

Within a repository, one coordinate names at most one content object, so references stay unambiguous. SOW rejects a different package that reuses an existing coordinate instead of silently replacing it, and a changed signature alone counts as different bytes.

With active RPM signing, SOW can reuse an existing signed object when its coordinate, signature-neutral payload, and signing policy all match. Otherwise, publish changed bytes as a new release with a new file name. See Signing model.

Command options are on the rm, show, and where pages.

Table reader