Conda Forge recently converted to exclusively emitting .conda
files for its package builds, instead of .tar.gz
files. With the tarballs, we could previously use tar
to unpack the archive.
How can one unpack the .conda
archive files?
Failed attempts
gzip
Naively trying gzip
gives
$ gzip -d libtiff-4.5.0-h82bc61c_0.conda
gzip: libtiff-4.5.0-h82bc61c_0.conda: unknown suffix -- ignored
and forcing the suffix with -S .conda
reports
$ gzip -d -S .conda libtiff-4.5.0-h82bc61c_0.conda
gzip: libtiff-4.5.0-h82bc61c_0.conda: not in gzip format
zstd
The blog post introducing the format mentions zstandard compression format, but using zstd
doesn't seem to fare any better:
$ zstd -d libtiff-4.5.0-h82bc61c_0.conda
zstd: libtiff-4.5.0-h82bc61c_0.conda: unknown suffix (.zst/.tzst expected). Can't derive the output file name. Specify it with -o dstFileName. Ignoring.
$ zstd -d -o libtiff libtiff-4.5.0-h82bc61c_0.conda
zstd: libtiff-4.5.0-h82bc61c_0.conda: unsupported format
Conda provides a Python package,
conda-package-handling
(see documentation), which comes installed with the base environment. This includes a CLI entry point,cph
, for working with Conda packages. One can extract a.conda
archive using, for example,Help Message
For reference, here is the help message the tool emits: