How to Completely Uninstall and Reinstall Vim (Windows, macOS, Linux)

How to Completely Uninstall and Reinstall Vim (Windows, macOS, Linux) - GuidingCode

If you’re trying to remove, uninstall or completely reinstall the Vim text editor and its settings on your Windows, macOS or Linux (Ubuntu) machine, this simple guide provides the steps to achieve this. Read on!

Vim is a free and open-source text editor that is available on Windows, Linux, and macOS. It can be used for many different purposes including programming, note-taking, and more. 

Additionally, Vim is also known for its efficiency and is easily customizable which makes it a go-to text editor option and a strong competitor for being one of the best editors available. 

How to Completely Uninstall and Reinstall Vim (Windows, macOS, Linux) - GuidingCode

 

However, the Vim editor may experience problems, show errors, or may not be installed correctly. In this case, it may be worth it to completely uninstall and reinstall Vim on your workspace.

That being said, in this guide, we’ll go over how to uninstall Vim and its settings on Windows, Linux, and macOS devices. We will also cover how to reinstall Vim on the aforementioned operating systems to ensure that a new and fresh version is being used.

 

 

Steps to Uninstall and Reinstall Vim on Windows

Uninstalling Vim on Windows

For Windows devices, we will be going through two ways to uninstall vim. The first way involves uninstalling vim through Apps and Features and the second way involves uninstalling vim through the vim uninstaller located in the installation folder in the form of an executable.

 

Method 1: Through the Apps and Features Menu

  1. First, search for apps and features in the windows start menu and open it.

uninstalling Vim on windows using Apps and Features menu to reinstall it completely

 

  1. Next, enter vim in the search bar and click on the 3 dots located on the right side. From the drop-down, click Uninstall.

uninstalling Vim on windows using Apps and Features menu to reinstall it completely

 

  1. A small pop=up will appear. Here, click Uninstall.

uninstalling Vim on windows using Apps and Features menu to reinstall it completely

 

  1. The vim uninstaller will open and click Next.

completely uninstalling and removing Vim on Windows to reinstall it

 

  1. Finally, select the components you wish to uninstall and click Uninstall. 

completely uninstalling and removing Vim on Windows to reinstall it

 

Method 2: Using the Vim Uninstaller File

  1. First, head to the vim installation location. It is most commonly located in:
C:\Program Files (x86)\Vim\vim82

 

  1. After that, scroll down the folder and click on the uninstall executable file.

uninstalling Vim on windows using Vim uninstaller file to reinstall it completely

 

  1. The following window will appear. Here, click Next. After that, the subsequent steps to uninstall are the same as the first method where you simply follow the steps of the uninstaller wizard.

completely uninstalling and removing Vim on Windows to reinstall it

 

Reinstalling Vim on Windows

In order to reinstall Vim on your Windows workspace:

  1. For starters, head to vim.org and click the Download button from the sidebar on the left. 

completely reinstalling Vim on Windows

 

  1. Select the PC-MS-DOS and MS-Windows option.

completely reinstalling Vim on Windows

 

  1. You will then be shown a few different installation options. Here, select the self-installing executable option.

completely reinstalling Vim on Windows

 

  1. Open the .exe file once it has been downloaded to begin the installation process and click Next.

completely reinstalling Vim on Windows

 

  1. Subsequently, accept the terms and conditions.

completely reinstalling Vim on Windows

 

  1. Then, the next step involves selecting your preferred install from the drop-down menu and checking the components you want in the list below. 

completely reinstalling Vim on Windows

 

  1. Next, you can also choose the compatibility and enhancements for the behaviour of Vim and you can also remap the keyboard and mouse keys to your preference.

completely reinstalling Vim on Windows

 

  1. The final step is to select the installation location. Once selected, proceed to click Install. 

completely reinstalling Vim on Windows

 

Once Vim has been installed, we can test it by:

  1. First, open the Command Prompt as an Administrator.

Running Command prompt as an administrator

 

  1. Then, navigate to the directory where your version of Vim is installed. In our case and Vim is usually located in: 
C:\Program Files (x86)\Vim\vim82.

 

  1. After that, enter vim test.txt and a vim terminal should open. 

testing if vim was reinstalled correctly on Windows

 

  1. Press the i key to enter insert mode and start typing. Once we’ve finished writing, hit the esc key to enter command mode, and then :wq and enter to save and close the file.

testing if vim was reinstalled correctly on Windows

 

  1. This should bring you back to the Command Prompt terminal. So finally, Enter dir to see the contents of the directory and you should see your vim file which you just created.

testing if vim was reinstalled correctly on Windows

 

Steps to Uninstall and Reinstall Vim on Linux

Uninstalling Vim on Linux

In order to uninstall Vim together with its configuration files and dependencies on an Ubuntu machine: 

  1. First, open the Terminal and enter:
sudo apt-get purge --auto-remove vim

 

  1. After that, enter your password if prompted and y to confirm the uninstallation.

uninstalling Vim on Ubuntu Linux through terminal to reinstall it completely

 

  1. Finally, confirm that vim has been uninstalled by entering dpkg –s vim. The result should be similar to below:

uninstalling Vim on Ubuntu Linux through terminal to reinstall it completely

 

Reinstalling Vim on Linux

To reinstall Vim on an Ubuntu Linux machine:

  1. First, open the terminal and enter sudo apt-get install vim. Enter your password if prompted and y to confirm the installation.

completely reinstalling Vim on Ubuntu Linux

 

  1. After that, we can test if Vim is working by entering the following command in the terminal: 
vim [filename].txt

testing if vim was reinstalled correctly on Ubuntu Linux

 

  1. Then, Vim should open. Here, press i to enter insert mode and start typing. Once done, press esc to return to command mode, type :wq and then enter to exit the file.

testing if vim was reinstalled correctly on Ubuntu Linux

 

  1. If we enter cat test.txt in the Terminal, we can read the text file that we just created with vim.

testing if vim was reinstalled correctly on Ubuntu Linux

 

Steps to Uninstall and Reinstall Vim on macOS

Uninstalling Vim on macOS

In order to completely uninstall Vim on a macOS machine:

  1. First, using Finder, head to the Applications folder and locate the MacVim.app file.
  2. After that, right-click on the file and select the Move to Trash option.

uninstalling Vim on macOS using Finder Applications folder to reinstall it completely

 

Next, to delete Vim’s service files:

  1. From the Finder menu bar at the top of your screen, select Go and then select Go to Folder from the drop-down menu.

go to folder using Finder on macOS

 

  1. Following that, enter ~/Library in the box that appears and click Go.

uninstalling Vim on macOS using Finder Applications "go to folder" command to reinstall it completely by deleting cache files

 

  1. Next, delete the Vim service files from the following directories:
  • ~/Library/Preferences/org.vim.MacVim.plist
  • ~/Library/Saved Application State/org.vim.MacVim.savedState

 

  1. Based on your utilization of Vim, you can also look at the following directories in Library to see if there are any unnecessary files to delete.
  • ~/Library/Caches
  • ~/Library/Logs
  • ~/Library/Application Support

 

  1. Finally, empty the Trash bin. 

emptying trash can on macOS

 

With that done, Vim should be completely uninstalled from your macOS machine!

 

Reinstall Vim on macOS

Before installing Vim, ensure that Homebrew is installed on your macOS machine as we will be using it to install Vim.

  1. First, open a Terminal and enter the following command:
brew install vim

 

  1. Once Vim has been installed, verify that it is installed correctly by entering:
Vim

 

  1. You can now close vim by hitting the esc key, type :q, and then hit Enter.

 

Conclusion

Uninstalling and reinstalling Vim can be somewhat tricky at first but it is straightforward once you know the steps that need to be taken. 

Some may want to completely uninstall and reinstall Vim on their machine to restart fresh, fix an installation or application error, or they may want to switch to a different text editor altogether. Whatever the reason is, this is the perfect guide for you!

In this article, we looked at how to completely uninstall and reinstall the Vim editor on Windows, Linux, and macOS

With that said, we hope you’ve found this guide helpful when it comes to uninstalling and reinstalling Vim.

Feel free to share this post with your fellow Vim users to guide them through uninstalling and reinstalling Vim.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Total
0
Share