# Install afsctool with Homebrew, MacPorts, Nix

Utility for manipulating APFS and ZFS compressed files. Version 1.7.3 via Homebrew; verified 2026-07-02. Also installable with nix: nix profile install nixpkgs#afsctool.

## Install

```sh
sudo av install brew:afsctool
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install afsctool
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install afsctool
```

  Evidence: MacPorts ports tree: sysutils/afsctool/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#afsctool
```

  Evidence: nixpkgs package indexes: pkgs/by-name/af/afsctool/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:afsctool
- **Package manager:** Homebrew
- **Version:** 1.7.3
- **Source summary:** Utility for manipulating APFS and ZFS compressed files
- **Homepage:** <https://brkirch.wordpress.com/afsctool/>
- **Repository:** <https://github.com/RJVB/afsctool>
- **Last updated:** 2026-07-02T11:12:14-04:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- afsctool (alias)
- zfsctool (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.7.3
## Project history and usage

afsctool is a command-line utility for applying, removing, and inspecting Apple filesystem compression. The original brkirch page describes it as an AFSC tool for HFS+ compression on Mac OS X 10.6 or later; the packaged RJVB fork extends that lineage with APFS-related work and a companion zfsctool.

### Project history

The original afsctool was published by brkirch as a Mac OS X utility for HFS+ compression. The RJVB repository identifies itself as a modified version of brkirch's afsctool and documents changes around error reporting, large-file memory pressure, multiple file arguments, backups, read-only files, and parallel compression.

The RJVB fork became the source used by modern package managers. Its README records versioned feature work in the 1.6 and 1.7 series, including parallel compression options, additional compression types introduced by Apple in OS X 10.9 and later, LZVN support, and later LZFSE support.

### Adoption history

afsctool is narrow but useful enough to appear in macOS-oriented package sets: the supplied facts list Homebrew, MacPorts, and Nix. That adoption tracks its niche: users who need to inspect or recompress files with Apple filesystem compression from scripts rather than through Finder or filesystem internals.

The RJVB fork also documents package-manager build dependencies and gives Homebrew and MacPorts examples, which helps explain why downstream formulae can build it despite the tool's macOS-specific subject matter.

### How it is used

Typical usage is post-hoc compression or inspection of files and folders already on a supported filesystem. The RJVB fork adds options for parallel compression, sorting work items by size, and changing compression types when the operating system and linked libraries support them.

zfsctool, built from the same repository, adapts the afsctool idea to ZFS recompression statistics and experiments. The README is explicit that zfsctool is still a work in progress, so package users should treat afsctool as the primary stable executable.

### Why package nerds care

afsctool is a classic small system package: obscure until you need it, highly platform-specific, and tightly bound to filesystem behavior and Apple compression formats. It is interesting to package maintainers because its dependency story and feature set move with macOS filesystem APIs and compression libraries.

The Homebrew formula exposes the RJVB fork rather than only the older brkirch page, so curation needs both sources: the original homepage explains the tool's purpose, while the repository explains the maintained code users actually install.

### Timeline

- 2012: brkirch afsctool page published for the original AFSC utility.
- 2015: RJVB afsctool GitHub repository created.
- 2018: RJVB 1.6.9 release commit added size sorting and reverse-worker options for parallel mode.
- 2024: RJVB repository still receiving updates according to GitHub metadata.

### Related projects

- Apple HFS+ and APFS filesystem compression are the core operating-system features afsctool manipulates.
- RJVB's LZVN fork and the lzfse/lzfse reference implementation are mentioned by the README as compression-library dependencies in the 1.7 series.
- zfsctool is the same repository's experimental ZFS-oriented companion utility.

### Sources

- <https://api.github.com/repos/RJVB/afsctool>
- <https://brkirch.wordpress.com/afsctool/>
- <https://github.com/RJVB/afsctool#readme>
- source_facts.package-manager


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Other Package-Manager Records

- Nix - afsctool: normalized package name match | nixpkgs package indexes: pkgs/by-name/af/afsctool/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - afsctool: normalized package name match | MacPorts ports tree: sysutils/afsctool/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/afsctool.yml](https://github.com/mxcl/pkgdb/blob/main/combined/afsctool.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
