I installed VIM by compiling from source a while back following the instructions here. At that time, for some reason, I didn't use checkinstall
, as a result I can't uninstall it using sudo apt-get remove vim
.
Following the advice here, I tried to remove VIM by
cd ~/tmp
hub clone vim/vim
cd vim
make VIMRUNTIMEDIR=/usr/local/share/vim/vim80
sudo make uninstall
Note, I am using make VIMRUNTIMEDIR=/usr/local/share/vim/vim80
instead of make VIMRUNTIMEDIR=/usr/share/vim/vim80
as suggested by the other link. This is because that's where there is a vim80
directory. I have also confirmed this by looking through my command line history that I indeed used make VIMRUNTIMEDIR=/usr/local/share/vim/vim80
when installing vim at that time.
After I ran the above set of commands, it seems that vim got removed, in that I can no longer start vim
by typing vim
in the command line. However, when I look at the output of the command, it seems its actually trying to remove the files from the non-existent directory at /usr/local/share/vim/vim81
. I have posted a snapshot of the output here but it's the same for the rest of the output
rmdir /usr/local/share/vim/vim81/doc /usr/local/share/vim/vim81/print /usr/local/share/vim/vim81/colors /usr/local/share/vim/vim81/syntax /usr/local/share/vim/vim81/indent
rmdir: failed to remove '/usr/local/share/vim/vim81/doc': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81/print': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81/colors': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81/syntax': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81/indent': No such file or directory
Makefile:2776: recipe for target 'uninstall_runtime' failed
make[1]: [uninstall_runtime] Error 1 (ignored)
rm -rf /usr/local/share/vim/vim81/ftplugin/*.vim /usr/local/share/vim/vim81/ftplugin/README.txt /usr/local/share/vim/vim81/ftplugin/logtalk.dict
rm -f /usr/local/share/vim/vim81/autoload/*.vim /usr/local/share/vim/vim81/autoload/README.txt
rm -f /usr/local/share/vim/vim81/autoload/dist/*.vim /usr/local/share/vim/vim81/autoload/xml/*.vim
rm -f /usr/local/share/vim/vim81/plugin/*.vim /usr/local/share/vim/vim81/plugin/README.txt
rmdir /usr/local/share/vim/vim81/ftplugin /usr/local/share/vim/vim81/autoload/dist /usr/local/share/vim/vim81/autoload/xml /usr/local/share/vim/vim81/autoload
rmdir: failed to remove '/usr/local/share/vim/vim81/ftplugin': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81/autoload/dist': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81/autoload/xml': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81/autoload': No such file or directory
Makefile:2776: recipe for target 'uninstall_runtime' failed
make[1]: [uninstall_runtime] Error 1 (ignored)
rmdir /usr/local/share/vim/vim81/plugin /usr/local/share/vim/vim81
rmdir: failed to remove '/usr/local/share/vim/vim81/plugin': No such file or directory
rmdir: failed to remove '/usr/local/share/vim/vim81': No such file or directory
Makefile:2776: recipe for target 'uninstall_runtime' failed
make[1]: [uninstall_runtime] Error 1 (ignored)
rmdir /usr/local/share/vim
rmdir: failed to remove '/usr/local/share/vim': Directory not empty
Makefile:2776: recipe for target 'uninstall_runtime' failed
make[1]: [uninstall_runtime] Error 1 (ignored)
rm -f /usr/local/bin/vim
rm -f /usr/local/bin/vimtutor
rm -f /usr/local/bin/gvimtutor
rm -f /usr/local/bin/ex /usr/local/bin/view
rm -f /usr/local/bin/gvim /usr/local/bin/gview
rm -f /usr/local/bin/rvim /usr/local/bin/rview
rm -f /usr/local/bin/rgvim /usr/local/bin/rgview
rm -f /usr/local/bin/vimdiff /usr/local/bin/gvimdiff
rm -f /usr/local/bin/evim /usr/local/bin/eview
rm -f /usr/local/bin/xxd
make[1]: Leaving directory '/home/dibya/tmp/vim/src'
When I looked at the folder in /usr/local/share/vim
, I noticed that the directory vim80
is still present.
Question
Is it enough to just delete the vim80
directory? Why is make uninstall
trying to remove vim
from /usr/local/share/vim/vim81
instead of /usr/local/share/vim/vim80
?
vim 8.0
version that I had and then tried to uninstall it.. It worked.. and the folder in/user/local/share/vim/vim80
was gone.. Perhaps its a bug.. that it doesn't respect theVIMRUNTIMEDIR
even when specified withmake
. – alpha_989 Jul 1 '18 at 22:05