How to Install Homebrew on Fedora 44

Install Homebrew on Fedora 44 with the official Linux setup. Covers shell setup, brew checks, package management, plus clean removal.

Last updatedAuthorJoshua JamesRead time6 minGuide typeFedora

Some developer tools move faster than Fedora’s repositories, and Homebrew gives Linux a separate package manager for command-line tools, language runtimes, and utilities in that gap. That makes it useful to install Homebrew on Fedora without any Mac background, because brew keeps its own formulas under /home/linuxbrew/.linuxbrew instead of mixing them into DNF.

Fedora does not ship Homebrew as a dnf install brew package. Homebrew on Linux used to be called Linuxbrew. On Fedora Workstation or Server, the supported install uses sudo once to create the default Linux prefix before the rest of your brew commands run as your normal user. No-sudo setups need a separate decision because the supported Linux install expects that prefix.

Install Homebrew on Fedora

Homebrew is a separate package manager on Linux, so the setup is mostly about getting the documented build tools in place before you run the official installer.

Update Fedora and install Homebrew prerequisites

Homebrew’s Linux requirements for Fedora start with the development-tools group plus procps-ng, curl, and file. These commands work on Fedora Workstation, Server, and trimmed virtual machine images, though fuller desktops may already have some of the packages installed.

sudo dnf upgrade --refresh

These commands use sudo for tasks that need root privileges. If your account is not in the sudoers file yet, follow the guide on how to add a user to sudoers on Fedora before continuing.

Refresh the package metadata first, then install the prerequisites Homebrew documents for Fedora:

sudo dnf group install development-tools
sudo dnf install procps-ng curl file

The development-tools group pulls in GCC, make, git, and related build utilities Homebrew expects on Linux. For deeper coverage of those dependencies, see install Git on Fedora and the curl command in Linux guide. On Fedora Workstation, DNF may report that some packages are already installed, and that is normal.

Run the official Homebrew installer

Run the supported installer from brew.sh. The script explains what it will change, then asks for confirmation before it creates the default Linux prefix under /home/linuxbrew. If Fedora’s system Ruby is not what Homebrew expects, the installer downloads Homebrew Portable Ruby automatically.

The supported Linux prefix requires sudo during setup. Without sudo or admin help, the default Fedora install cannot create /home/linuxbrew/.linuxbrew; Homebrew’s alternate prefixes are unsupported for normal bottle use.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Updating Homebrew...
Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.
==> Installation successful!

==> Next steps:
- Run these commands in your terminal to add Homebrew to your PATH:
    echo >> /home/joshua/.bashrc
    echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"' >> /home/joshua/.bashrc
    eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"
- Install Homebrew's dependencies if you have sudo access:
    sudo dnf group install development-tools

The rc-file path in that output is an example, so it will use your own home directory rather than /home/joshua/.bashrc. Current Linux installs also print download progress, analytics, documentation, donation, and brew install gcc suggestions around the same next-step block, so your output may be longer than the excerpt. The important part is the brew shellenv bash line that the installer prints for your account.

Add Homebrew to your shell path

Save the same shellenv line from the installer so new Bash sessions can find brew immediately. The guard keeps the entry from being duplicated if you rerun the setup later.

touch ~/.bashrc
line="eval \"\$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)\""
grep -qxF "$line" ~/.bashrc || printf "\n%s\n" "$line" | tee -a ~/.bashrc >/dev/null
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"

The touch command creates the rc file if needed. If you use Zsh instead of Bash, apply the same pattern to ${ZDOTDIR:-$HOME}/.zshrc and replace bash with zsh in the brew shellenv command.

Verify the Homebrew installation

Check that brew resolves and prints a version first. The version number changes as Homebrew ships releases, so do not worry if it differs from older examples.

brew --version

Then run Homebrew’s built-in diagnostics. The healthy brew doctor message is the success signal to look for.

brew doctor
Your system is ready to brew.

If brew doctor reports warnings instead, read the warning text first; many Fedora issues point back to missing build tools, PATH setup, or prefix ownership.

Install a test formula with Homebrew

A quick hello install confirms that Homebrew can fetch a bottle, place it under the Linux prefix, and run the resulting command on Fedora. After the install finishes, the final hello command should print a short greeting.

brew install hello
hello
Hello, world!

Remove the test formula when you are done:

brew uninstall hello

Manage Homebrew Packages on Fedora

Once Homebrew is working, these are the commands you will use most often for day-to-day package management inside the brew prefix.

Search, inspect, and install Homebrew formulas

Replace hello with the formula you actually want to manage:

brew search hello
brew info hello
brew install hello

If you want to compare Homebrew-managed tools with Fedora’s native packages, useful reference points are install Git on Fedora, install Golang on Fedora, and install Neovim on Fedora.

Update and clean up Homebrew

Use Homebrew’s own update and cleanup commands when you are managing software inside the brew prefix instead of through DNF.

brew update
brew upgrade
brew outdated
brew cleanup --dry-run
brew cleanup

brew outdated gives you a quick list of pending upgrades. The dry run keeps cleanup predictable by showing which old downloads and bottles would be removed before anything is deleted.

Troubleshoot Homebrew on Fedora

Most Homebrew problems on Fedora come from shell setup or ownership changes after someone runs brew with sudo. These checks are faster than reinstalling the whole prefix.

Fix brew command not found on Fedora

A fresh shell will not find Homebrew until you load its shellenv and save the same line in ~/.bashrc. The grep check uses the same matching pattern covered in the grep command in Linux guide if you want to adapt it for another shell rc file.

eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"
touch ~/.bashrc
line="eval \"\$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)\""
grep -Fxq "$line" ~/.bashrc && echo "Found in .bashrc" || echo "Not in .bashrc"
Not in .bashrc

If the last line says Not in .bashrc, save the Bash entry with the same rerun-safe guard and then open a new shell:

touch ~/.bashrc
line="eval \"\$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)\""
grep -qxF "$line" ~/.bashrc || printf "\n%s\n" "$line" | tee -a ~/.bashrc >/dev/null
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"

Fix Homebrew permission issues on Fedora

If you used sudo with a brew command, stop and check ownership before running more Homebrew operations. A healthy install keeps /home/linuxbrew root-owned while the writable prefix under /home/linuxbrew/.linuxbrew belongs to your user. Root-owned files inside the writable prefix can break installs, updates, or uninstall cleanup.

ls -ld /home/linuxbrew /home/linuxbrew/.linuxbrew
drwxr-xr-x. 1 root   root    20 Mar  9 18:06 /home/linuxbrew
drwxr-xr-x. 1 joshua joshua 126 Mar  9 18:06 /home/linuxbrew/.linuxbrew

If the second line is owned by root or another user, repair the writable prefix ownership. This is a broad ownership repair, so run it only for the Homebrew prefix shown here:

sudo chown -R "$(whoami)":"$(id -gn)" /home/linuxbrew/.linuxbrew

Confirm that Homebrew is healthy again after the ownership repair:

brew doctor
Your system is ready to brew.

Never run brew commands with sudo. Some read-only commands may appear to work as root, but they can still create root-owned cache or Git state inside the Homebrew prefix. The installer needs elevated privileges only while it prepares the default Linux prefix under /home/linuxbrew.

Remove Homebrew from Fedora

Start with Homebrew’s official uninstaller so the cache and Linux prefix are cleaned up in the order the project expects.

Run the official Homebrew uninstaller

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

The uninstaller may show a leftover list near the end of its output. If earlier root-owned files caused a partial uninstall, the same manual review and prefix cleanup still applies:

==> Removing Homebrew installation...
==> Removing empty directories...
The following possible Homebrew files were not deleted:
/home/linuxbrew/.linuxbrew/Homebrew/
/home/linuxbrew/.linuxbrew/lib/
You may wish to remove them yourself.

The official uninstaller handles Homebrew’s own uninstall sequence, but it does not edit shell rc files and may leave paths it lists for manual review. Review the listed paths before using the destructive cleanup commands in the next section.

Remove leftover Homebrew files from Fedora

The next cleanup permanently deletes the Homebrew prefix and any formulas, bottles, and cached state inside it. Back up anything you still need from /home/linuxbrew/.linuxbrew before running it.

Confirm the remaining prefix path, then remove it:

if [ -d /home/linuxbrew/.linuxbrew ]; then
  ls -ld /home/linuxbrew/.linuxbrew
  sudo rm -rf /home/linuxbrew/.linuxbrew
fi

if [ -d /home/linuxbrew ]; then
  sudo rmdir /home/linuxbrew
fi

If sudo rmdir /home/linuxbrew reports that the directory is not empty, inspect the remaining files before deleting anything else.

If you added Homebrew to Bash, remove the saved brew shellenv bash line from ~/.bashrc so new shells stop loading Homebrew after you remove the prefix. The sed command examples guide covers the same targeted line-deletion pattern if you want to preview it first.

if [ -f ~/.bashrc ]; then
  sed -i '/brew shellenv bash/d' ~/.bashrc
fi

If you use Zsh instead, remove the matching line from the active Zsh rc file:

zshrc="${ZDOTDIR:-$HOME}/.zshrc"
if [ -f "$zshrc" ]; then
  sed -i '/brew shellenv zsh/d' "$zshrc"
fi

Use only the rc-file cleanup command that matches your shell. If you skip it, Bash or Zsh can complain that /home/linuxbrew/.linuxbrew/bin/brew no longer exists the next time a new shell opens.

Confirm the Homebrew prefix is gone:

if [ -e /home/linuxbrew ] || [ -e /home/linuxbrew/.linuxbrew ]; then
  ls -ld /home/linuxbrew /home/linuxbrew/.linuxbrew 2>/dev/null
else
  echo removed
fi
removed

A default install should not require separate cleanup under ~/.config/Homebrew, ~/.local/share/Homebrew, ~/.var/app, or ~/.linuxbrew unless you created those paths yourself or Homebrew printed them in its leftover list.

Conclusion

Homebrew is running on Fedora from its supported Linux prefix, and DNF can keep handling the system packages Homebrew was never meant to replace. If you want more tools under the same workflow, install Git on Fedora, install Golang on Fedora, or install Neovim on Fedora next.

Share this guide

Help another Linux user troubleshoot faster

Share this guide with someone troubleshooting Linux systems or saving it for later.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show our tutorials more often in Top Stories and mark them as preferred in AI Mode and AI Overviews when relevant.

Add LinuxCapable as a preferred source on Google
Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffeeBuy me a coffee
Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<a href="https://example.com">link</a> link
<blockquote>quote</blockquote> quote block

Add to the discussion

Questions, fixes, command output, and version notes help keep this guide current.

Verify before posting: