Uninstall fnm
If you need to uninstall fnm, please follow the steps below.
Quick Uninstall
Using the Uninstall Script
fnm provides a convenient uninstall script:
curl -fsSL https://fnm.vercel.app/uninstall | bashThis script will automatically:
- Delete the fnm binary
- Clean up the fnm directory (
~/.fnm) - Prompt you to remove fnm-related code from your Shell configuration
Manual Uninstall
If the uninstall script doesn't work properly, you can uninstall manually.
Step 1: Delete fnm Directory
fnm stores all files in the ~/.fnm directory by default:
rm -rf ~/.fnmStep 2: Delete fnm Binary
Depending on the installation method, the fnm binary may be located in different places:
# Homebrew installation
brew uninstall fnm
# Manual installation (check common locations)
rm -f /usr/local/bin/fnm
rm -f ~/.local/bin/fnm
rm -f ~/bin/fnmStep 3: Clean Shell Configuration
Remove fnm-related configuration from Shell configuration files:
# Edit ~/.bashrc, remove the following line
eval "$(fnm env --use-on-cd)"# Edit ~/.zshrc, remove the following line
eval "$(fnm env --use-on-cd)"# Edit ~/.config/fish/config.fish, remove the following line
fnm env --use-on-c | source# Edit $PROFILE, remove the following line
fnm env --use-on-cd | Out-String | Invoke-ExpressionStep 4: Reload Shell
# Bash
source ~/.bashrc
# Zsh
source ~/.zshrc
# Fish
source ~/.config/fish/config.fish
# PowerShell
. $PROFILEPlatform-Specific Uninstall Guide
macOS
# Homebrew installation
brew uninstall fnm
rm -rf ~/.fnm
# Remove fnm-related lines from Shell configurationWindows
Using winget
winget uninstall Schniz.fnmUsing Scoop
scoop uninstall fnmUsing Chocolatey
choco uninstall fnmManual Deletion
- Delete fnm directory:
%USERPROFILE%\.fnm - Remove fnm path from PATH
- Clean up PowerShell profile
Linux
# Delete fnm directory
rm -rf ~/.fnm
# Delete binary (depending on installation location)
rm -f /usr/local/bin/fnm
rm -f ~/.local/bin/fnm
# Clean Shell configuration
# Edit ~/.bashrc or ~/.zshrcKeep Node.js Versions
If you want to keep installed Node.js versions, you can backup before uninstalling:
# View fnm directory structure
ls -la ~/.fnm
# Backup node versions (if needed)
cp -r ~/.fnm/node-versions ~/node-backupVerify Uninstall
Confirm fnm is completely uninstalled:
# Should output "command not found" or similar error
fnm --version
# Check if fnm directory is deleted
ls ~/.fnmCommon Issues
Shell Startup Error After Uninstall
If Shell reports errors after uninstalling, check if there's still fnm-related code in configuration files.
fnm Path Still in PATH
Check and edit Shell configuration file to remove all fnm-related PATH settings.
Want to Reinstall fnm
You can reinstall fnm anytime after uninstalling:
# macOS/Linux
curl -fsSL https://fnm.vercel.app/install | bash
# Windows
winget install Schniz.fnmRelated Links
- Install fnm - Reinstall fnm
- Ubuntu Uninstall Guide - Detailed Ubuntu uninstall steps