# Install liblockfile with Homebrew, apk, apt, dnf, Nix, pacman, zypper

Library providing functions to lock standard mailboxes. Version 1.17 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:liblockfile
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install liblockfile
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add liblockfile
```

  Evidence: Alpine Linux edge package indexes: liblockfile from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install liblockfile-bin
```

  Evidence: Debian stable package indexes: liblockfile-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install liblockfile
```

  Evidence: Fedora Rawhide package metadata: liblockfile from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#liblockfile
```

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

- pacman (92%):

```sh
sudo pacman -S liblockfile
```

  Evidence: Arch Linux sync databases: liblockfile from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install liblockfile-devel
```

  Evidence: openSUSE Tumbleweed package metadata: liblockfile-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:liblockfile
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/liblockfile>
- **Version:** 1.17
- **Source summary:** Library providing functions to lock standard mailboxes
- **Homepage:** <https://tracker.debian.org/pkg/liblockfile>
- **Repository:** <https://github.com/miquels/liblockfile>
- **Upstream docs:** <https://github.com/miquels/liblockfile#readme>
- **License:** LGPL-2.0-or-later
- **Source archive:** <https://deb.debian.org/debian/pool/main/libl/liblockfile/liblockfile_1.17.orig.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- dotlockfile (cli)
- dotlockfile (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.17
- Local data: ok
- Upstream repository: https://tracker.debian.org/pkg/liblockfile
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

liblockfile is a small Unix system library and utility package for creating NFS-safe lockfiles, especially the dot-lock files traditionally used to protect mailboxes in /var/mail.

### Project history

The upstream README describes liblockfile as an implementation of functions found in -lmail on SysV systems, extended with functions to create, manage, and remove generic lockfiles. Its locking algorithm uses a temporary file and link(2) to create lockfiles atomically, including workarounds for NFS server behavior.

The dotlockfile utility is documented as a command-line tool to create, test, touch, and remove lockfiles. Its name comes from the traditional mailbox convention of appending .lock to the mailbox path.

### Adoption history

liblockfile has a long Debian packaging history and remains represented as Debian source package liblockfile, producing liblockfile-bin, liblockfile-dev, and liblockfile1. Its practical audience is mail tools, shell scripts, and legacy Unix software that need interoperable dot-locking rather than newer advisory-lock APIs.

### How it is used

The library is used by programs that need NFS-safe lock creation. The dotlockfile command is used directly in scripts or as the setgid mail helper that lets mailbox-locking programs avoid carrying setgid mail themselves.

### Why package nerds care

liblockfile is interesting because it packages an old but still sharp Unix portability problem: locking mail spools safely across local and NFS filesystems. It is small, unglamorous infrastructure that explains why some packages still ship helpers for mail-era filesystem semantics.

### Timeline

- 2011: Changelog entry for liblockfile 1.09 recorded Debian bug fixes and cross-build cleanup.
- 2016: Upstream GitHub repository created on November 22, 2016.
- 2017: dotlockfile manual page dated January 10, 2017.
- 2019: liblockfile 1.16 simplified permission checking and quiet-mode behavior.
- 2021: liblockfile 1.17 added dotlockfile -P and -i options.

### Related projects

- The README names procmail, exim, and mutt as compatible NFS-safe lockfile users.
- Debian packaging is maintained separately at the liblockfile-debian repository.

### Sources

- <https://api.github.com/repos/miquels/liblockfile>
- <https://github.com/miquels/liblockfile>
- <https://packages.debian.org/source/trixie/liblockfile>
- <https://raw.githubusercontent.com/miquels/liblockfile/master/Changelog>
- <https://raw.githubusercontent.com/miquels/liblockfile/master/dotlockfile.1>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** liblockfile
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - liblockfile-bin - 1.17-2: normalized package name match | Debian stable package indexes: liblockfile-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | support binaries for and cli utilities based on liblockfile | https://github.com/miquels/liblockfile
- Debian apt - liblockfile-dev - 1.17-2: normalized package name match | Debian stable package indexes: liblockfile-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development library for liblockfile | https://github.com/miquels/liblockfile
- Debian apt - liblockfile1 - 1.17-2: normalized package name match | Debian stable package indexes: liblockfile1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | NFS-safe locking library | https://github.com/miquels/liblockfile
- Nix - liblockfile: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/liblockfile/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - liblockfile-bin - 1.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: liblockfile-bin from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | support binaries for and cli utilities based on liblockfile | https://github.com/miquels/liblockfile
- Ubuntu apt - liblockfile-dev - 1.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: liblockfile-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Development library for liblockfile | https://github.com/miquels/liblockfile
- Ubuntu apt - liblockfile1 - 1.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: liblockfile1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | NFS-safe locking library | https://github.com/miquels/liblockfile
- apk - liblockfile - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions | https://github.com/miquels/liblockfile
- apk - liblockfile-dev - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions (development files) | https://github.com/miquels/liblockfile
- apk - liblockfile-doc - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions (documentation) | https://github.com/miquels/liblockfile
- apk - liblockfile-static - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions (static library) | https://github.com/miquels/liblockfile
- dnf - liblockfile - 1.17-12.fc44: normalized package name match | Fedora Rawhide package metadata: liblockfile from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | This implements a number of functions found in -lmail on SysV systems | http://packages.qa.debian.org/libl/liblockfile.html
- dnf - liblockfile-devel - 1.17-12.fc44: normalized package name match | Fedora Rawhide package metadata: liblockfile-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for liblockfile | http://packages.qa.debian.org/libl/liblockfile.html
- pacman - liblockfile - 1.17_2-1: normalized package name match | Arch Linux sync databases: liblockfile from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | a library with NFS-safe locking functions | https://packages.debian.org/unstable/libs/liblockfile1
- zypper - liblockfile-devel - 1.17-1.10: normalized package name match | openSUSE Tumbleweed package metadata: liblockfile-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for liblockfile | https://github.com/miquels/liblockfile
- zypper - liblockfile1 - 1.17-1.10: normalized package name match | openSUSE Tumbleweed package metadata: liblockfile1 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Library with NFS-safe locking functions | https://github.com/miquels/liblockfile


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Matched curated package taxonomy and local package facts.
- [chmlib](https://www.automicvault.com/pkg/brew/chmlib/) - Shares av.db curated category or tags: c, cli, libraries, library, system.
- [isa-l](https://www.automicvault.com/pkg/brew/isa-l/) - Shares av.db curated category or tags: cli, libraries, library, system.
- [glibc](https://www.automicvault.com/pkg/brew/glibc/) - Shares av.db curated category or tags: cli, libraries, system.
- [libcpucycles](https://www.automicvault.com/pkg/brew/libcpucycles/) - Shares av.db curated category or tags: c, cli, library, system.
- [libcpuid](https://www.automicvault.com/pkg/brew/libcpuid/) - Shares av.db curated category or tags: c, cli, library, system.
- [libzip](https://www.automicvault.com/pkg/brew/libzip/) - Shares av.db curated category or tags: c, cli, library, system.
- [augeas](https://www.automicvault.com/pkg/brew/augeas/) - Shares av.db curated category or tags: cli, library, system.
- [cahute](https://www.automicvault.com/pkg/brew/cahute/) - Shares av.db curated category or tags: cli, library, system.
- [xnvme](https://www.automicvault.com/pkg/brew/xnvme/) - Local package facts share a topical domain. Shared terms: cli, file, libraries, library, system.

## Combined YAML source

View the package source record on GitHub. [combined/liblockfile.yml](https://github.com/automic-vault/db/blob/main/combined/liblockfile.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
