Last Updated on 2021-11-15 by Clay
The article is recorded about how to uninstall vim editor, in addition to that, the following commands can also be use to uninstall any package or tool that is managed by apt
.
This means that if the package you want to delete is named abc, then you can change the vim of the command below to the abc you need, it's easy.
Uninstall a package
(Note: You will see apt-get
command instead of apt
command in many places. The two are different commands. Now it is encouraged to use apt
command instead of apt-get
, but the commands recorded below can also be used apt-get
to replace.)
The package deleting usually have three situations:
Delete only the vim package
sudo apt remove vim
This method only deletes the vim package.
Delete the vim package and related dependencies
sudo apt remove --auto-remove vim
Generally, if we use a .deb file to install, only the required file will be installed, but this often results in a situation where the problem cannot be executed due to lack of dependencies even if the program is installed.
However, using the apt
command to install has no such disadvantages; during the apt
installation process, it will automatically detect whether your execution environment lacks relevant dependencies, and automatically install those lacking dependencies and libraries for you.
With the --auto-remove
parameter, these related dependencies can be deleted together.
Delete the vim package and local configuration files
Many packages and programs will have local configuration files, if you want to remove these, you can use the following command:
sudo apt purge vim
or
sudo apt purge --auto-remove vim
But remember! After that, it will not be possible to restore the original personal local configuration file by reinstalling the package.