To Re-install new version follow the below steps
1.Download new version from Node official website. In my case my downloaded file is node-v18.10.0-linux-x64.tar.xz
2.Move the file into /usr/local directory using the command
sudo mv Downloads/node-v18.10.0-linux-x64.tar.xz /usr/local
3.Use the below command to extract into appropriate directories in /usr/local
sudo tar --strip-components 1 -xf
node-v18.10.0-linux-x64.tar.xz
4.verify installation
node --version
Sorce: https://stackoverflow.com/questions/33863164/uninstall-nodejs-installed-from-binary-distribution-files