# Install ocrmypdf with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper

Adds an OCR text layer to scanned PDF files. Version 17.8.0 via Homebrew; verified 2026-07-02.

## Install

```sh
sudo av install brew:ocrmypdf
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install ocrmypdf
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ocrmypdf
```

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

### Linux

- apk (92%):

```sh
sudo apk add ocrmypdf
```

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

- Debian apt (92%):

```sh
sudo apt install ocrmypdf
```

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

- dnf (92%):

```sh
sudo dnf install ocrmypdf
```

  Evidence: Fedora Rawhide package metadata: ocrmypdf 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#ocrmypdf
```

  Evidence: nixpkgs package indexes: ocrmypdf from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- zypper (92%):

```sh
sudo zypper install python311-ocrmypdf
```

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

## Package facts

- **Package key:** brew:ocrmypdf
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/ocrmypdf>
- **Version:** 17.8.0
- **Source summary:** Adds an OCR text layer to scanned PDF files
- **Homepage:** <https://ocrmypdf.readthedocs.io/en/latest/>
- **Repository:** <https://github.com/ocrmypdf/OCRmyPDF>
- **Upstream docs:** <https://ocrmypdf.readthedocs.io/en/latest>
- **License:** MPL-2.0
- **Source archive:** <https://files.pythonhosted.org/packages/4b/c4/c44db9ff5282e7c73856f437434777745d18bb9404f431df70e786a6bcc7/ocrmypdf-17.8.0.tar.gz>
- **Last updated:** 2026-07-02T12:13:48Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- ocrmypdf (cli)
- ocrmypdf (alias)

## Dependencies

- cryptography
- freetype
- ghostscript
- img2pdf
- jbig2enc
- libheif
- libpng
- pillow
- pngquant
- pybind11
- pydantic
- python@3.14
- qpdf
- tesseract
- unpaper

## Build dependencies

- cmake
- pkgconf

## Uses from macOS

- libffi
- libxml2
- libxslt

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 17.8.0
- Package-manager updated: 2026-07-02
- Local data: ok
- Upstream repository: https://ocrmypdf.readthedocs.io/en/latest/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

OCRmyPDF is a Python command-line application and library that adds an OCR text layer to scanned PDF files, making image-based documents searchable and copyable while preserving the original page images where possible.

### Project history

The project’s documentation frames OCRmyPDF around an awkward document-processing gap: PDF is the normal container for scanned documents, but existing scanned PDFs are difficult to modify. OCRmyPDF automates the pipeline of rasterizing pages, running OCR, inserting an invisible text layer, and writing a validated PDF or PDF/A output.

PyPI release history shows OCRmyPDF 3.0 published on 2015-09-05 and 4.2.2 on 2016-08-31, already advertising searchable PDF/PDF-A generation and preservation of embedded image resolution. Later documentation describes a public API, plugin support, image optimization, language packs, Docker usage, and feature-specific release notes, showing its expansion from a practical CLI into a packaged document-processing toolkit.

### Adoption history

OCRmyPDF’s adoption follows the shape of the scanned-document problem: Linux, macOS, and distribution packagers ship it because it wraps several hard-to-coordinate pieces into one reproducible CLI. The project is available through PyPI and package managers including Homebrew, Debian/Ubuntu, Fedora, MacPorts, Nix, Alpine, and openSUSE-family packages.

The project’s packaging notes thank downstream packagers and point to broad porting status, while the README badges and package metadata show attention to PyPI, Homebrew, Read the Docs, and Python-version compatibility. That packaging breadth is part of its appeal: users can install a single command rather than hand-assemble Tesseract, Ghostscript or pypdfium2, image preprocessing, PDF/A conversion, metadata handling, and validation steps.

### How it is used

The common workflow is `ocrmypdf input.pdf output.pdf`, with options for languages, page rotation, deskewing, cleaning, metadata, job parallelism, output type, PDF optimization, and redoing or skipping existing OCR. The README emphasizes searchable PDF/A output, accurate placement of OCR text below images, lossless insertion where possible, image optimization, input/output validation, Tesseract language support, and scaling to large PDFs.

The project is also used as a library or scripted tool in document-ingestion systems. Its public API and plugin documentation exist for callers that need OCRmyPDF behavior inside larger PDF processing flows rather than only from a shell.

### Why package nerds care

OCRmyPDF is packaging glue with real teeth: it turns a fragile OCR/PDF toolchain into one command while still exposing dependency choices, language-data packaging, Docker images, plugin hooks, and PDF/A policy. It is a good package-nerd example of a Python CLI whose value is orchestrating native tools and file-format edge cases cleanly.

### Timeline

- 2015-09-05: PyPI lists OCRmyPDF 3.0.
- 2016-08-31: PyPI lists OCRmyPDF 4.2.2 with the core searchable-PDF feature set.
- 2020s: release notes document continued work on PDF handling, API behavior, image optimization, plugins, rasterizer choices, and preservation of existing text layers.

### Related projects

- OCRmyPDF depends conceptually and operationally on Tesseract OCR, PDF/A tooling, Ghostscript or pypdfium2 rasterization paths, image preprocessing tools, Python PDF libraries, and distribution language-pack packages.

### Sources

- <https://github.com/ocrmypdf/OCRmyPDF/blob/master/README.md>
- <https://ocrmypdf.readthedocs.io/>
- <https://ocrmypdf.readthedocs.io/en/stable/installation.html>
- <https://ocrmypdf.readthedocs.io/en/stable/maintainers.html>
- <https://ocrmypdf.readthedocs.io/en/stable/releasenotes/index.html>
- <https://pypi.org/project/ocrmypdf/>
- <https://pypi.org/project/ocrmypdf/3.0/>
- <https://pypi.org/project/ocrmypdf/4.2.2/>
- source_facts.executables
- source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ocrmypdf
- **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 - ocrmypdf - 16.7.0+dfsg1-3: normalized package name match | Debian stable package indexes: ocrmypdf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | add an OCR text layer to PDF files | https://github.com/jbarlow83/OCRmyPDF
- Debian apt - ocrmypdf-doc - 16.7.0+dfsg1-3: normalized package name match | Debian stable package indexes: ocrmypdf-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | add an OCR text layer to PDF files - documentation | https://github.com/jbarlow83/OCRmyPDF
- Nix - ocrmypdf: normalized package name match | nixpkgs package indexes: ocrmypdf from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - ocrmypdf - 15.2.0+dfsg1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: ocrmypdf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | add an OCR text layer to PDF files | https://github.com/jbarlow83/OCRmyPDF
- Ubuntu apt - ocrmypdf-doc - 15.2.0+dfsg1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: ocrmypdf-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | add an OCR text layer to PDF files - documentation | https://github.com/jbarlow83/OCRmyPDF
- apk - ocrmypdf - 16.11.1-r2: normalized package name match | Alpine Linux edge package indexes: ocrmypdf from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Add OCR text layer to scanned PDF files | https://github.com/ocrmypdf/OCRmyPDF
- apk - ocrmypdf-pyc - 16.11.1-r2: normalized package name match | Alpine Linux edge package indexes: ocrmypdf-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for ocrmypdf | https://github.com/ocrmypdf/OCRmyPDF
- dnf - ocrmypdf - 16.12.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: ocrmypdf from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Add an OCR text layer to scanned PDF files | https://github.com/ocrmypdf/OCRmyPDF
- dnf - ocrmypdf+watcher - 16.12.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: ocrmypdf+watcher from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Metapackage for ocrmypdf: watcher extras | https://github.com/ocrmypdf/OCRmyPDF
- dnf - ocrmypdf-doc - 16.12.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: ocrmypdf-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | ocrmypdf documentation | https://github.com/ocrmypdf/OCRmyPDF
- zypper - python311-ocrmypdf - 17.4.2-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python311-ocrmypdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | OCRmyPDF adds an OCR text layer to scanned PDF files | https://github.com/ocrmypdf/OCRmyPDF
- zypper - python313-ocrmypdf - 17.4.2-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python313-ocrmypdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | OCRmyPDF adds an OCR text layer to scanned PDF files | https://github.com/ocrmypdf/OCRmyPDF
- zypper - python314-ocrmypdf - 17.4.2-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python314-ocrmypdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | OCRmyPDF adds an OCR text layer to scanned PDF files | https://github.com/ocrmypdf/OCRmyPDF
- MacPorts - ocrmypdf: normalized package name match | MacPorts ports tree: textproc/ocrmypdf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [freetype](https://www.automicvault.com/pkg/brew/freetype/) - Runtime dependency declared by Homebrew.
- [ghostscript](https://www.automicvault.com/pkg/brew/ghostscript/) - Runtime dependency declared by Homebrew.
- [img2pdf](https://www.automicvault.com/pkg/brew/img2pdf/) - Runtime dependency declared by Homebrew.
- [jbig2enc](https://www.automicvault.com/pkg/brew/jbig2enc/) - Runtime dependency declared by Homebrew.
- [libheif](https://www.automicvault.com/pkg/brew/libheif/) - Runtime dependency declared by Homebrew.
- [libpng](https://www.automicvault.com/pkg/brew/libpng/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [gocr](https://www.automicvault.com/pkg/brew/gocr/) - Shares av.db curated category or tags: cli, media, ocr.
- [md2pdf](https://www.automicvault.com/pkg/brew/md2pdf/) - Shares av.db curated category or tags: cli, documents, media, pdf.
- [ocrad](https://www.automicvault.com/pkg/brew/ocrad/) - Shares av.db curated category or tags: cli, media, ocr.
- [ssocr](https://www.automicvault.com/pkg/brew/ssocr/) - Shares av.db curated category or tags: cli, media, ocr.
- [tesseract](https://www.automicvault.com/pkg/brew/tesseract/) - Shares av.db curated category or tags: cli, media, ocr.
- [ly](https://www.automicvault.com/pkg/brew/ly/) - Shares av.db curated category or tags: cli, document-processing, media, python.
- [pdfly](https://www.automicvault.com/pkg/brew/pdfly/) - Shares av.db curated category or tags: cli, media, pdf, python.
- [psutils](https://www.automicvault.com/pkg/brew/psutils/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, document, document-processing, documents, media.

## Combined YAML source

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