2017-03-13 64 views
0

我想重新安裝從源代碼與在CentOS蟒蛇詢問服務VIM 8 7如何從centos7中刪除vim?

首先我想刪除舊vim的,但是當我嘗試使用sudo yum remove vim得到:

Loaded plugins: fastestmirror, langpacks, replace 
Repository nodesource is listed more than once in the configuration 
Repository nodesource-source is listed more than once in the configuration 
No Match for argument: vim 
No Packages marked for removal 

我試圖刪除VIM rm -rf /usr/local/share/vim

但是之後刪除鍵入命令vim --version並獲得:

vim --version 
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 12 2017 14:25:06) 
Included patches: 1-445 
Compiled by [email protected] 
Huge version without GUI. Features included (+) or not (-): 
+acl    +file_in_path +mouse_sgr  +tag_old_static 
+arabic   +find_in_path -mouse_sysmouse -tag_any_white 
+autocmd   +float   +mouse_urxvt  -tcl 
-balloon_eval +folding   +mouse_xterm  +termguicolors 
-browse   -footer   +multi_byte  +terminfo 
++builtin_terms +fork()   +multi_lang  +termresponse 
+byte_offset  +gettext   -mzscheme  +textobjects 
+channel   -hangul_input +netbeans_intg +timers 
+cindent   +iconv   +num64   +title 
-clientserver +insert_expand +packages  -toolbar 
-clipboard  +job    +path_extra  +user_commands 
+cmdline_compl +jumplist  -perl   +vertsplit 
+cmdline_hist +keymap   +persistent_undo +virtualedit 
+cmdline_info +lambda   +postscript  +visual 
+comments  +langmap   +printer   +visualextra 
+conceal   +libcall   +profile   +viminfo 
+cryptv   +linebreak  -python   +vreplace 
+cscope   +lispindent  -python3   +wildignore 
+cursorbind  +listcmds  +quickfix  +wildmenu 
+cursorshape  +localmap  +reltime   +windows 
+dialog_con  -lua    +rightleft  +writebackup 
+diff   +menu   -ruby   -X11 
+digraphs  +mksession  +scrollbind  -xfontset 
-dnd    +modify_fname +signs   -xim 
-ebcdic   +mouse   +smartindent  -xpm 
+emacs_tags  -mouseshape  +startuptime  -xsmp 
+eval   +mouse_dec  +statusline  -xterm_clipboard 
+ex_extra  -mouse_gpm  -sun_workshop -xterm_save 
+extra_search -mouse_jsbterm +syntax   
+farsi   +mouse_netterm +tag_binary  
    system vimrc file: "$VIM/vimrc" 
    user vimrc file: "$HOME/.vimrc" 
2nd user vimrc file: "~/.vim/vimrc" 
     user exrc file: "$HOME/.exrc" 
     defaults file: "$VIMRUNTIME/defaults.vim" 
    fall-back for $VIM: "/usr/local/share/vim" 
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1  
Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim  -lm -ltinfo -lnsl -lselinux -ldl 
+0

我刪除了'/ usr/share/vim','/ usr/local/share/vim'和'/ usr/local/bin/vim manualy' manualy。 –

回答

0

你可以試試這個?

for file in $(rpm -q --configfiles vim) 
do 
    echo " removing $file" 
    rm -f $file 
done 
rpm -e vim