Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I found this great link: How do I resolve unmet dependencies? but I can't seem to get any command involving apt-get to run correctly.

My main problem is a partition filling up and don't know why, so I'm trying to remove unneeded packages.

Ex:  apt-get purge aspell-en  returns:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 vim : Depends: vim-runtime (= 2:7.2.445+hg~cb94c42c0e1a-1) but it is not 
going to be     installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages 
(or specify a solution).

This message happens no matter which apt-get command I choose, including those meant to fix the problem in the first place!

To make matters worse, my disk is 100% full and I can't figure out how to fix.

When I run: apt-get -f install , it says:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
      vim-runtime
The following NEW packages will be installed:
      vim-runtime
0 upgraded, 1 newly installed, 0 to remove and 228 not upgraded.
1 not fully installed or removed.
Need to get 6,207 kB of archives.
After this operation, 26.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.us.debian.org/debian/ squeeze/main vim-runtime all 2:7.2.445+hg~cb94c42c0e1a-1 [6,207 kB]
Fetched 6,207 kB in 1s (3,907 kB/s)
(Reading database ... 131282 files and directories currently installed.)

Unpacking vim-runtime (from .../vim-runtime_2%3a7.2.445+hg~cb94c42c0e1a-1_all.deb)

Adding 'diversion of /usr/share/vim/vim72/doc/help.txt to
/usr/share/vim/vim72/doc/help.txt.vim-tiny by vim-runtime'

dpkg-divert: rename involves overwriting
`/usr/share/vim/vim72/doc/help.txt.vim-tiny' with different file 
`/usr/share/vim/vim72/doc/help.txt', not allowed
dpkg: error processing /var/cache/apt/archives/vim-
runtime_2%3a7.2.445+hg~cb94c42c0e1a-1_all.deb (--unpack):

subprocess new pre-installation script returned error exit status 2
configured to not write apport reports

No diversion 'diversion of /usr/share/vim/vim72/doc/help.txt by vim-runtime', none removed.
No diversion 'diversion of /usr/share/vim/vim72/doc/tags by vim-runtime', none   removed.

Errors were encountered while processing:
/var/cache/apt/archives/vim-runtime_2%3a7.2.445+hg~cb94c42c0e1a-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

If I try to remove vim-runtime, I get:

Package vim-runtime is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 vim : Depends: vim-runtime (= 2:7.2.445+hg~cb94c42c0e1a-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
share|improve this question
    
Could you add the output of dpkg --get-selections | grep install | grep vim and sudo apt-get check? –  Braiam Sep 10 '13 at 12:44
add comment

1 Answer 1

up vote 0 down vote accepted

First things first, try the command it's telling you to try:

apt-get -f install

To fix any broken packages. If your disk is full, this may or may not work depending on whether the broken package has been completely downloaded.

If the above doesn't work for lack of space, try

aptitude clean

to free up some space. Note, however, that this will clean your apt package cache (these are .deb files for the packages you installed; stored in /var/cache/apt/archives); the actual packages will remain installed, but you will no longer have the .deb files on disk and would need to re-download them if you purge/re-install an existing package.

Update

In response to your edited question, I think you need:

apt-get purge vim vim-runtime
apt-get install vim vim-runtime
share|improve this answer
    
I have tried both those commands. aptitude clean fees a couple MB, but apt-get -f install ends up with all sorts of errors. I'll post above. –  Corepuncher Sep 9 '13 at 19:00
    
@Corepuncher Answer updated. –  Joseph R. Sep 9 '13 at 19:08
    
Thanks for your help Joseph. It seems my machine is hopeless :-) –  Corepuncher Sep 9 '13 at 19:39
    
@Corepuncher Don't give up hope yet. Try purging vim and vim-runtime. –  Joseph R. Sep 9 '13 at 19:41
    
Thanks, purge vim worked, (vim-runtime did not). Now I can apt-get yay. –  Corepuncher Sep 13 '13 at 7:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.