5

I'm currently using Ubuntu 12.04 and have Vim 7.3 installed and I want to update it to the latest version. I'm still new to how all these package manager stuff works, but I was wondering why can't I just do the following: "sudo apt-get update vim" ? I mean it was installed on the system initially, so why wouldn't one be able to just type a one liner to update vim?

Also I tried to do a search via: sudo apt-get search vim to see which one is installed and it doesnt seem to find it. How can someone find out what is the installed app so we can update it?

Right now I just want to update this to the latest vim with least amount of commands required.

enter image description here

0

1 Answer 1

7

I was wondering why can't I just do the following: "sudo apt-get update vim" ?

The correct way of running it is sudo apt-get update. This command resynchronize the package index files from server, so that information about new and updated packages is available.

The current version of Vim in Ubuntu 12.04 repository is 7.3. So running sudo apt-get upgrade( which is used to install the newest versions of all packages currently installed on the system from the server) will not upgrade your Vim to it's latest release.

However you can install its latest version (i.e 7.4) by adding the third party ppa.

To install it, open terminal and type

sudo add-apt-repository ppa:fcwu-tw/ppa
sudo apt-get update
sudo apt-get install vim

(I have not tested it,but should work perfectly.)


You can also install the latest version of Vim by compiling it from the source.
For this see this answer

I tried to do a search via: sudo apt-get search vim to see which one is installed and it doesnt seem to find it

You can dpkg -s <packagename> to get the status of specified package which also include the version of installed package. If you are intrested in version only refine your query using dpkg -s <packagename> | grep 'Version'

For eaxmaple

dpkg -s vim | grep 'Version'

Update

Ubuntu 12.04 LTS reached its regular End of Life on April 28, 2017. No more package updates, including security updates, will be accepted to the 12.04 primary archive.

1
  • Unfortunately, it does not offer vim for Precise anymore.
    – JrBenito
    Jun 22, 2016 at 20:44

Not the answer you're looking for? Browse other questions tagged .