0

After I tried to remove VIM from system, simple apt-get remove --purge vim doesn't do the trick and there still were some vim files, like in /usr/share/vim/. SO I decided to remove them mannually

sudo rm -r `whereis vim`

after that apt-get install vim return this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/953 kB of archives.
After this operation, 2,287 kB of additional disk space will be used.
Selecting previously unselected package vim.
(Reading database ... 93025 files and directories currently installed.)
Preparing to unpack .../vim_2%3a7.4.488-7+deb8u2_amd64.deb ...
Unpacking vim (2:7.4.488-7+deb8u2) ...
Setting up vim (2:7.4.488-7+deb8u2) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/vi.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/view.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/ex.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group ex) doesn't exist

More than. Vi is Vim now (running vi => actually runs vim)

I can't do anything to completely remove and reinstall vim as it were before. What to do, to install vim from scratch, with filling /usr/share/vim, /etc/vim and others paths. Because them are actually empty

~ vim
Error detected while processing /home/kaldown/.vim/vimrc:
line   19:
E484: Can't open file /usr/share/vim/syntax/syntax.vim
Press ENTER or type command to continue

P.S. Will try to ask from another perspective.

How to restore VIM after executing

sudo rm -rf `whereis vim`

Because apt-get install vim, wont restore /usr/share/vim/ which has files like syntax.vim

migrated from stackoverflow.com Apr 16 '17 at 2:04

This question came from our site for professional and enthusiast programmers.

  • 1
    1. Why do you want to remove Vim from your system. 2. On Debian, vi has always been vim. – romainl Apr 15 '17 at 12:43
  • 1. Because I's broken, and I want to reinstall it from scratch. 2. ok. So how to fully restore VIM, If I can't remove it? – kAldown Apr 15 '17 at 12:57
2

You may need to manually remove the package using:

sudo dpkg --purge --force-all vim

Kindly install vim package again in your system.

sudo apt-get update; sudo apt-get install vim
0
sudo apt-get remove `sudo dpkg-query -l | grep vim`

and after that

sudo apt-get update; sudo apt-get install vim vim-python

solves my problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.