# How to Remove Node.js 18 and Install Node.js 16 on a Raspberry Pi 4B

- URL: https://rdjarbeng.com/Installing_NodeJs_16/
- Published: 2025-07-26
- Author: Richard Djarbeng
- Series: Raspberry Pi Setup, part 1
- Tags: NodeJs, installation, Raspberry Pi, raspberry pi 4B, Linux



> **Note:** For an updated guide on installing Node.js on Raspberry Pi (ARMv7 / Raspberry Pi 4B), see [How to install NodeJs on the Raspberry Pi 4](/Install_NodeJs_on_Raspberry_Pi/).

To install Node.js 16 after uninstalling Node.js 18, you can use the NodeSource repository to get the specific version you want. Here's a step-by-step guide using the terminal:

![NodeJs site July 2024 screenshot ](/assets/images/nodejs_2024.png)

### Remove the existing Node.js version

```
sudo apt remove nodejs
```

### Install the NodeSource repository for Node.js 16

```
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
```

### Install Node.js 16

```
sudo apt install -y nodejs
```

This will install Node.js 16 on your system. You can verify the installation by checking the version:

```
node -v
```

This should output the version of Node.js 16 that you just installed.
