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

Library providing functions to lock standard mailboxes. Version 1.17 via Homebrew; verified from local package data. Also installable with debian: sudo apt install liblockfile-bin.

## 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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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

- 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

- zypper (92%):

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

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

## Package facts

- **Package key:** brew:liblockfile
- **Package manager:** Homebrew
- **Version:** 1.17
- **Source summary:** Library providing functions to lock standard mailboxes
- **Homepage:** <https://tracker.debian.org/pkg/liblockfile>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- dotlockfile (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.17
## 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

## 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-13.fc45: normalized package name match | Fedora Rawhide package metadata: liblockfile from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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-13.fc45: 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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.12: normalized package name match | openSUSE Tumbleweed package metadata: liblockfile-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for liblockfile | https://github.com/miquels/liblockfile
- zypper - liblockfile1 - 1.17-1.12: normalized package name match | openSUSE Tumbleweed package metadata: liblockfile1 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Library with NFS-safe locking functions | https://github.com/miquels/liblockfile


## Combined YAML source

View the package source record on GitHub. [combined/liblockfile.yml](https://github.com/mxcl/pkgdb/blob/main/combined/liblockfile.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
