Problem scenario: You are running Ubuntu 16.10. When you log in you see this message:
65 packages can be updates. 33 updates are security updates.
As root you run this: apt-get upgrade
However you get this ominous message:
"The following packages have unmet dependencies: vim: Depends: vim-common (= 2:7.4.1829-1ubuntu2.1 2:7.4.1829-1ubuntu2 is to be installed vim-runtime (= 220.127.116.119-1ubuntu2.1) but 2:7.4.1829-1ubuntu2 is installed
vim-tiny : Depends vim-common (= 2:7.4.1829-1ubuntu2.1) but 2:7.4.1829-1ubuntu2 is installed"
You tried to install aptitude to address this problem, but you receive an error similar to the messages above. How can you apply the security updates for Ubuntu?
Solution: To get around this problem with vim, try this command: "apt-get -f install". Then run "apt-get update". Finally, run "apt-get upgrade". The command "apt-get update" should be run first to update the meta data about potential packages and updates themselves. This way when you install something, the latest package will be selected. The command "apt-get upgrade" actually installs packages and updates on your machine (rather than merely update meta data about the updates that are available). For more information, see this link.