How to Install Node.js on Fedora 44

Install Node.js on Fedora 44 using DNF, NodeSource, or NVM. Covers updates, version checks, troubleshooting, npm fixes, and cleanups.

Last updatedAuthorJoshua JamesRead time7 minGuide typeFedora

Fedora now packages Node.js by major branch, while upstream JavaScript projects often expect a specific LTS or Current line. To install Node.js on Fedora without mixing package sources, choose whether Fedora, NodeSource, or NVM should own the runtime and npm updates.

On Fedora 44, the distro repositories provide versioned packages such as nodejs24 and nodejs22. NodeSource uses setup scripts such as setup_24.x or setup_26.x to publish an unversioned nodejs package from its RPM repository, and NVM installs Node.js under your home directory for per-project switching.

Install Node.js on Fedora

Three paths cover most Fedora setups:

MethodChannelPackage or BranchUpdatesBest For
Fedora DNFFedora repositoriesnodejs24, nodejs22, or nodejs20Automatic with dnf upgradeDistro-managed LTS installs
NodeSource RPMNodeSourcenodejs from the selected setup scriptAutomatic with dnf upgradeUpstream LTS or Current releases in system paths
Node Version Manager (NVM)NVMAny supported major for one user accountManual with nvm installPer-project version switching
  • Use Fedora DNF when Fedora’s versioned packages, especially nodejs24, fit your stack and you want fully distro-managed updates.
  • Use NodeSource when you want the latest upstream 24.x LTS or 26.x Current package in /usr/bin/node.
  • Use NVM when different projects need different Node.js majors on the same Fedora host.

Before installing Node.js, refresh Fedora’s package metadata and apply any pending updates:

sudo dnf upgrade --refresh -y

These commands use sudo for package management tasks. If your account is not configured for administrative access yet, follow the guide on how to add a user to sudoers on Fedora first.

Methods 2 and 3 use curl. Fedora Workstation usually already includes it, while Server or minimal installs may need it first:

sudo dnf install curl -y

Install Node.js from Fedora DNF Repository

The Fedora package path is the simplest choice when you want Node.js managed entirely through DNF. Fedora 44 uses versioned package names, so install nodejs24 for the newest Fedora-packaged LTS branch instead of the older unversioned nodejs command form.

sudo dnf install nodejs24 -y

Verify the runtime, npm, and installed package names. The nodejs24 package pulls in the matching nodejs24-npm package, so npm is ready without a second install command:

node --version
npm --version
rpm -q nodejs24 nodejs24-npm
v24.13.1
11.8.0
nodejs24-24.13.1-1.fc44.x86_64
nodejs24-npm-11.8.0-1.24.13.1.1.fc44.noarch

Fedora 44 also publishes nodejs22 for projects that still need the Jod LTS line, but nodejs20 is upstream EOL and should be treated as a legacy compatibility package. If you need a newer upstream build than Fedora currently ships, use the NodeSource method or NVM instead. Confirm lifecycle changes at the official Node.js release schedule.

Install Node.js from NodeSource on Fedora

NodeSource is the cleanest system-wide option when Fedora’s packaged branch is not the upstream line your project expects. The current Fedora workflow uses the official setup_*.x script, which writes repository files to /etc/yum.repos.d/ and prepares DNF for the selected Node.js stream.

Choose the setup script that matches your target major version:

  • setup_24.x: Node.js 24.x, the current Active LTS line (Krypton) and the safest NodeSource choice for most new projects
  • setup_22.x: Node.js 22.x, the current Maintenance LTS line (Jod) for projects that are not ready to move to 24.x
  • setup_26.x: Node.js 26.x, the current short-support release for testing the newest upstream features

This example configures Node.js 24.x. Replace setup_24.x with setup_22.x or setup_26.x if your project needs a different stream:

curl -fsSL https://rpm.nodesource.com/setup_24.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh

The -o nodesource_setup.sh flag saves the script to a local file so you can inspect or rerun it before executing it with sudo bash. On Fedora 44, the LTS setup scripts create nodesource-nodejs.repo and nodesource-nsolid.repo; the Node.js package comes from nodesource-nodejs.

Confirm that the NodeSource repositories were added:

dnf repo list --enabled | grep nodesource
nodesource-nodejs     Node.js Packages for Linux RPM based distros - x86_64
nodesource-nsolid     N|Solid Packages for Linux RPM based distros - x86_64

Install Node.js from the newly added repository:

sudo dnf install nodejs -y

Verify the installed runtime and package source:

node --version
npm --version
rpm -q nodejs
v24.15.0
11.12.1
nodejs-24.15.0-1nodesource.x86_64

NodeSource updates through normal DNF upgrades. To switch major versions later, rerun the matching setup_22.x, setup_24.x, or setup_26.x script and then install nodejs again.

Install Node.js with NVM on Fedora

NVM installs Node.js into your home directory instead of Fedora’s system paths. That makes it the best choice when one project still needs Node.js 22 while another has already moved to 24 or 26.

Install the current NVM release and load it into your shell:

curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh -o nvm-install.sh
bash nvm-install.sh
source ~/.bashrc

Alternatively, open a new terminal window instead of reloading ~/.bashrc manually.

Zsh users should replace ~/.bashrc with ~/.zshrc. NVM is a shell function, not a binary, so verify it with command -v instead of which. Fedora does not currently provide an nvm package for dnf install nvm in this workflow:

command -v nvm
nvm

For more on shell lookup behavior, the which command guide explains why command -v is the safer check here.

Install an LTS Release with NVM on Fedora

Install the latest LTS release directly:

nvm install --lts
Downloading and installing node v24.15.0...
Downloading https://nodejs.org/dist/v24.15.0/node-v24.15.0-linux-x64.tar.xz...
######################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v24.15.0 (npm v11.12.1)

If a project requires a specific supported major, request that major explicitly, such as nvm install 22 or nvm install 24.

Confirm the active runtime and npm version:

node --version
npm --version
v24.15.0
11.12.1

Switch Between Node.js Versions with NVM on Fedora

Install another major, switch to it, and set your default version for future shells:

nvm install 22
nvm use 22
nvm alias default 'lts/*'
nvm ls
Now using node v22.22.3 (npm v10.9.8)
       v22.22.3 *
->     v24.15.0 *
default -> lts/* (-> v24.15.0 *)
node -> stable (-> v24.15.0 *) (default)
stable -> 24.15 (-> v24.15.0 *) (default)
lts/jod -> v22.22.3 *
lts/krypton -> v24.15.0 *

Test Node.js on Fedora

After any install method, run a small JavaScript expression so the active runtime proves it can execute code, not only print a version number:

node -e 'console.log("Node.js " + process.version + " is ready on Fedora")'
npm --version
Node.js v24.x.x is ready on Fedora
11.x.x

This is a good point to install Git on Fedora for version control or install Yarn on Fedora if your projects prefer it over npm.

Update Node.js on Fedora

Use the update path that matches the method you installed. Mixing DNF, NodeSource, and NVM updates on the same runtime is how version drift starts.

Update DNF or NodeSource Node.js on Fedora

Fedora and NodeSource packages both update through DNF. If you stay on the same major line, a standard upgrade is enough:

sudo dnf upgrade --refresh -y

Verify the active runtime after the upgrade:

node --version
npm --version
# Fedora nodejs24 example
v24.13.1
11.8.0

# NodeSource 24.x example
v24.15.0
11.12.1

If you want a different NodeSource major version, rerun the matching setup_22.x, setup_24.x, or setup_26.x script first and then let DNF reinstall nodejs from the new repository stream. For Fedora repository installs, switch by installing the versioned package you need, such as nodejs22 or nodejs24.

Update NVM-Managed Node.js on Fedora

NVM updates by installing the target version, switching to it, and refreshing the default alias:

nvm install --lts
nvm alias default 'lts/*'
nvm use default
Now using node v24.15.0 (npm v11.12.1)
default -> lts/* (-> v24.15.0 *)

Troubleshoot Node.js on Fedora

Most Fedora Node.js issues come from shell initialization, source mixing, or checking the wrong binary after you add NVM.

Fix “nvm: command not found” on Fedora

If the NVM install script completed but your next command fails like this:

bash: nvm: command not found

Your current shell has not loaded the NVM initialization lines yet. Reload the shell profile that the installer modified:

source ~/.bashrc

Zsh users should reload ~/.zshrc instead. Confirm that NVM is now available:

command -v nvm
nvm

Fix Zsh Globbing with NVM LTS Aliases

If Zsh returns a globbing error when you set an LTS alias, quote the alias pattern so the shell passes it to NVM unchanged:

zsh: no matches found: lts/*
nvm alias default 'lts/*'
default -> lts/* (-> v24.15.0 *)

Check Which Node.js Binary Fedora Is Using

If version output looks wrong after you test both DNF and NVM, check where the active node command is coming from:

command -v node
rpm -q nodejs24 nodejs
node --version
/usr/bin/node
nodejs24-24.13.1-1.fc44.x86_64
package nodejs is not installed
v24.13.1

If the first line points into ~/.nvm/versions/, an NVM-managed runtime is active in your shell. If it points to /usr/bin/node, you are using a Fedora package such as nodejs24 or a NodeSource package such as nodejs.

Fix Permission Denied During Global npm Install on Fedora

If global npm installs fail on a DNF or NodeSource setup, the current npm prefix is usually pointing at a root-owned system path.

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules

Check the active prefix first:

npm config get prefix
/usr/local

If it points to a system directory, move global npm packages into a user-owned path and reload your shell:

mkdir -p ~/.npm-global
npm config set prefix "$HOME/.npm-global"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Alternatively, open a new terminal window after appending the PATH line.

Verify the new prefix:

npm config get prefix
/home/username/.npm-global

NVM avoids this problem by keeping npm packages under your home directory from the start.

Remove Node.js from Fedora

Use the removal steps that match the way you installed Node.js so package files, repos, and shell initialization do not linger.

Remove DNF or NodeSource Node.js from Fedora

Fedora and NodeSource use different package names for the system runtime. Run only the removal command that matches your install method.

For a Fedora repository install, remove the versioned package and its matching npm package:

sudo dnf remove nodejs24 nodejs24-npm -y

For a NodeSource install, remove the unversioned NodeSource package:

sudo dnf remove nodejs -y

Verify that the system packages are gone. Adjust the Fedora package names if you installed another branch such as nodejs22:

rpm -q nodejs24 nodejs24-npm nodejs
package nodejs24 is not installed
package nodejs24-npm is not installed
package nodejs is not installed

If you used NodeSource, remove the repository files as well:

sudo rm -f /etc/yum.repos.d/nodesource*.repo
sudo dnf clean all

Confirm that the NodeSource repositories are no longer enabled:

dnf repo list --enabled | grep -E '^nodesource' || echo "NodeSource repositories are not enabled"
NodeSource repositories are not enabled

Remove NVM-Managed Node.js from Fedora

To remove one NVM-managed version, uninstall that major directly. To remove the whole NVM toolchain, delete the NVM directory and the shell init block that loads NVM. Keep ~/.npm unless you deliberately want to remove your user-level npm cache and global package metadata.

The next command permanently deletes every Node.js version installed through NVM, along with npm packages stored under your NVM tree. If you want to keep one project runtime, uninstall individual versions first instead of removing the whole directory.

rm -rf ~/.nvm

Remove the NVM initialization lines from ~/.bashrc or ~/.zshrc. They look like this:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

After deleting those lines, open a new terminal or clear the current shell state manually:

unset -f nvm 2>/dev/null || true
hash -r
source ~/.bashrc

For Zsh, remove the same NVM lines from ~/.zshrc and open a new terminal after saving the file.

Confirm that both NVM and Node.js are no longer available from your shell:

command -v nvm || echo "nvm not found"
command -v node || echo "node not found"
nvm not found
node not found

Conclusion

Node.js is installed on Fedora from a source that matches the update model you want: a versioned Fedora package, a NodeSource RPM stream, or a per-user NVM runtime. From here, initialize the project, pin the package manager your repository expects, and keep the update and removal path tied to the method that owns the active node command.

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: