How to Uninstall or Install js2-mode on Ubuntu 22.04

Updated: August 29, 2022

This JavaScript editing mode supports: I will show you how to install js2-mode on Ubuntu 22.04 in this guide.

Requirements to install

  • Operating system: Ubuntu 22.04 or older Ubuntu versions
  • Privileges: Ensure that you are able to execute the sudo commands line.

Prerequisites to install js2-mode on Ubuntu 22.04

Install js2-mode Ubuntu 22.04

js2-mode is one of the popular ways on Ubuntu now so that this tutorial will show you some ways to install it. Choose the one you believe is simple and easy to follow.

Install js2-mode using APT

This is one of the most popular methods for installing Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these steps to get js2-mode on your Ubuntu.

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to download new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt-get update

Step 2: Install the package on Ubuntu 22.04. You can now install js2-mode Ubuntu by executing this command in the terminal.

sudo apt -y install js2-mode

Install js2-mode using Aptitude

You must run this command to install Aptitude if you haven’t already done so on Ubuntu.

sudo apt-get -y install aptitude

Then, you can now install js2-mode, just following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Launching the terminal and entering the following Linux command:

sudo apt update

Step 2: Start the package installation on Ubuntu 22.04. After updating, you can install js2-mode Ubuntu by pasting this command into the terminal and pressing Enter.

sudo aptitude install js2-mode

Uninstall js2-mode on Ubuntu 22.04

Have you ever thought about how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone can easily uninstall any program, not just a package.

This command can be used to uninstall js2-mode from Ubuntu 22.04 if it was installed using APT or Aptitude.

sudo apt remove --auto-remove js2-mode

You can also execute this command if you want to uninstall js2-mode and remove its data and dependencies:

sudo apt autoremove --purge js2-mode


In this guide, I showed you ways to install js2-mode on Ubuntu 22.04 and some ways to uninstall js2-mode too. If you need any help, don’t hesitate to contact me. I’m very glad to answer them.