0
After messing stuff up trying to install/uninstall some plugins I hosed up vim completey. Running ubuntu server (no gui) how can I get back vim to the way it was originally installed with ubuntu (including any links).
$> sudo dpkg --get-selections ... uuid-runtime install vim-common deinstall vim-runtime deinstall vim-tiny deinstall vsftpd install ...
Hoping there's a way to just install those (and anything else that might be missing) Things that didn't work: $> apt-get install vim-full
$> dpkg --get-selections > selections $> dpkg --set-selections < selections $> aptitude reinstall '~pstandard' (after which I still see) ... uuid-runtime install vim-common deinstall vim-runtime deinstall vim-tiny deinstall vsftpd install ...
After that I still see just a049212@ubuntu-rails:~$ sudo find / -type f -iname 'vim' /usr/share/gettext/styles/po-vim.css /usr/share/man/man5/apparmor.vim.5.gz /var/cache/apt/archives/vim-common_2%3a7.2.245-2ubuntu2_i386.deb /var/cache/apt/archives/vim_2%3a7.2.245-2ubuntu2_i386.deb /var/cache/apt/archives/vim-runtime_2%3a7.2.245-2ubuntu2_all.deb /var/cache/apt/archives/vim-tiny_2%3a7.2.245-2ubuntu2_i386.deb /var/lib/dpkg/info/vim-common.postrm /var/lib/dpkg/info/vim-runtime.list /var/lib/dpkg/info/vim-tiny.list /var/lib/dpkg/info/vim-runtime.postrm /var/lib/dpkg/info/vim-common.list
@P.Langeberg: "Could not get lock /var/lib/dpkg/lock" means that another instance of aptitude, apt-get or dpkg is already running.Removing it helps, but you should first check that there's really no ohter aptitude etc. running. – sleske – 2010-06-03T18:58:09.547
+1 for using aptitude instead of apt-get – Vokuhila-Oliba – 2010-01-09T20:59:40.237
1st didn't work. The 2nd led to the solution for me. I couldn't run the 2nd as it was. I kept getting "E: Could not get lock /var/lib/dpkg/lock". When I seperated the 3 commands it worked. Here's my solution. sudo rm /var/lib/dpkg/lock sudo aptitude install vim-tiny sudo aptitude purge vim sudo aptitude install vim
Thanks so much!!! – Phil Langeberg – 2010-01-09T21:28:29.413
Sorry about the single-line thing. I habitually violate the Ubuntu guidelines and type "sudo su" before doing multi-step processes that require root. – CarlF – 2010-01-10T03:50:20.257