How to remove a package from the list of packages to be installed in apt-get?

After I tried installing vim using apt-get install, apt-get keeps giving me a segmentation fault while trying to install vim-runtime. I'm pretty sure it's just with that one specific package, and whenever I try to do apt-get install to install any other package, vim-runtime is in the list of packages that will be installed, and it's always the first package that tries to install, so I can't install any other packages.

How can I remove vim-runtime from the list of packages that will be installed? It always shows up even if it is not a dependency of a package I want to install.

Note: This is on an Ubuntu rootfs running on ARM.


The only correct way to make apt not try and install vim-runtime is to sudo apt-get remove vim.

Dpkg crashing while unpacking vim-runtime is either a serious bug, or an indication that something's wrong with your hardware. (Although hardware errors are usually more random.)


I suspect that the .deb file for vim-runtime did not download properly, so apt-get crashes on it.

Look into /var/cache/apt/archives and delete this vim-runtime* file. To do so, run

gksudo -- nautilus --no-desktop /var/cache/apt/archives/

It's fine to erase any other .deb files from that folder, as these are cached .deb. files.


I had this problem before and eventually I had to run dpkg -S package-name to find all the files associated with the package and delete them, which solved the problem.