# Install thefuck with Homebrew, apk, apt, dnf, MacPorts, pacman

Programmatically correct mistyped console commands. Version 3.32 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:thefuck
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install thefuck
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install thefuck
```

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

### Linux

- apk (92%):

```sh
sudo apk add thefuck
```

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

- Debian apt (92%):

```sh
sudo apt install thefuck
```

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

- dnf (92%):

```sh
sudo dnf install thefuck
```

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

- pacman (92%):

```sh
sudo pacman -S thefuck
```

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

## Package facts

- **Package key:** brew:thefuck
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/thefuck>
- **Version:** 3.32
- **Source summary:** Programmatically correct mistyped console commands
- **Homepage:** <https://github.com/nvbn/thefuck>
- **Repository:** <https://github.com/nvbn/thefuck>
- **Upstream docs:** <https://github.com/nvbn/thefuck#readme>
- **License:** MIT
- **Source archive:** <https://files.pythonhosted.org/packages/ac/d0/0c256afd3ba1d05882154d16aa0685018f21c60a6769a496558da7d9d8f1/thefuck-3.32.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- fuck (cli)
- thefuck (cli)
- fuck (alias)
- thefuck (alias)

## Dependencies

- python@3.14

## Install behavior

- Post-install hook: not defined
- Caveats: Add the following to your .bash_profile, .bashrc or .zshrc: eval $(thefuck --alias) For other shells, check https://github.com/nvbn/thefuck/wiki/Shell-aliases
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.32
- Local data: ok
- Upstream repository: https://github.com/nvbn/thefuck
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

The Fuck is a Python command-line utility for correcting a previously failed shell command. Its official README presents it as an app inspired by a tweet and built around the `fuck` alias, which lets a user rerun a corrected version of the last command after errors such as missing `sudo`, misspelled Git subcommands, command-not-found typos, or bad package-manager invocations.

### Project history

The project grew around a rules engine: the README says it matches the previous command against enabled rules, creates a replacement command, and executes it after confirmation. The rule list spans common developer and system tools, including package managers, Git, Docker, language toolchains, shells, and file utilities, making the project less a spelling corrector than a catalog of everyday terminal failure modes.

### Adoption history

The Fuck became unusually visible for a shell helper: the official GitHub page shows tens of thousands of stars and thousands of forks, while the assigned package facts list packages across Homebrew, Debian, Ubuntu, Fedora, Arch, Alpine, MacPorts, and other ecosystems. Its README also documents installation through Homebrew, FreeBSD packages, Chromebrew, Arch packages, and pip, which reflects the tool's spread through both language and OS package-manager culture.

### How it is used

The normal workflow is to install the package, add `eval $(thefuck --alias)` to a shell startup file, run a command that fails, and then type the alias to accept or select a corrected command. The README also documents options such as running without confirmation, recursively retrying fixes, customizing rules in `settings.py`, and using environment variables to tune behavior.

### Why package nerds care

For package nerds, The Fuck is interesting because many of its examples and built-in rules encode package-manager ergonomics: it can add `sudo` for `apt-get`, correct Chocolatey package suffixes, fix Homebrew- and system-tool-adjacent command mistakes, and turn common install-time errors into repeatable command rewrites. It is also a good example of a package whose memorable command name helped it become a cross-distro terminal utility.

### Timeline

- 2017: GitHub tags page shows the 3.23 release.
- 2018: GitHub tags page shows multiple 3.x releases, including 3.26 through 3.28.
- 2022: GitHub tags page shows release 3.32.
- Current README: documents package-manager installation, shell alias setup, rule-based correction, settings.py, and environment-variable configuration.

### Related projects

- Related tools in the same terminal-productivity niche include shell history search, command-not-found helpers, package-manager suggestion tools, and shell frameworks that add aliases or completions. The Fuck differs by taking the previous failed command and proposing a runnable replacement.

### Sources

- <https://github.com/nvbn/thefuck#readme - official README for description, examples, installation methods, alias setup, rule engine, settings.py, and environment variables.>
- <https://github.com/nvbn/thefuck/tags - official GitHub tags page for release timeline.>
- input source_facts.package-manager - assigned package facts list cross-ecosystem package-manager availability.


## Security Notes

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/thefuck/settings.py
## Source Database Details

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

## Other Package-Manager Records

- Debian apt - thefuck - 3.32-0.3: normalized package name match | Debian stable package indexes: thefuck from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | spelling corrector of console commands | https://github.com/nvbn/thefuck
- Ubuntu apt - thefuck - 3.29-0.3ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: thefuck from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | spelling corrector of console commands | https://github.com/nvbn/thefuck
- apk - thefuck - 3.32-r6: normalized package name match | Alpine Linux edge package indexes: thefuck from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | The Fuck is a magnificent app that corrects errors in previous console commands. | https://github.com/nvbn/thefuck
- apk - thefuck-pyc - 3.32-r6: normalized package name match | Alpine Linux edge package indexes: thefuck-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for thefuck | https://github.com/nvbn/thefuck
- dnf - thefuck - 3.32-20.fc44: normalized package name match | Fedora Rawhide package metadata: thefuck from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | App that corrects your previous console command | https://github.com/nvbn/thefuck
- pacman - thefuck - 3.32-12: normalized package name match | Arch Linux sync databases: thefuck from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Magnificent app which corrects your previous console command | https://github.com/nvbn/thefuck
- MacPorts - thefuck: normalized package name match | MacPorts ports tree: python/thefuck/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow 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.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [bashish](https://www.automicvault.com/pkg/brew/bashish/) - Shares av.db curated category or tags: cli, shell, system, terminal.
- [murex](https://www.automicvault.com/pkg/brew/murex/) - Shares av.db curated category or tags: cli, shell, system, terminal.
- [nsh](https://www.automicvault.com/pkg/brew/nsh/) - Shares av.db curated category or tags: cli, shell, system, terminal.
- [nushell](https://www.automicvault.com/pkg/brew/nushell/) - Shares av.db curated category or tags: cli, shell, system, terminal.
- [bash](https://www.automicvault.com/pkg/brew/bash/) - Shares av.db curated category or tags: cli, shell, system.
- [brush](https://www.automicvault.com/pkg/brew/brush/) - Shares av.db curated category or tags: cli, shell, system.
- [dash-shell](https://www.automicvault.com/pkg/brew/dash-shell/) - Shares av.db curated category or tags: cli, shell, system.
- [elvish](https://www.automicvault.com/pkg/brew/elvish/) - Shares av.db curated category or tags: cli, shell, system.
- [hyfetch](https://www.automicvault.com/pkg/brew/hyfetch/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, python, python-3-14, system, terminal.
- [recoverpy](https://www.automicvault.com/pkg/brew/recoverpy/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, python, python-3-14, system, terminal.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- 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
