E: Unable to correct problems, you have held broken packages

Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible suggested working scenarios you would like.

sudo aptitude install myNewPackage

If you don't have aptitude on your machine yet, get it with

sudo apt-get install aptitude

You should be able to see the list of held packages by:

apt-mark showhold 

and then un-hold them by

sudo apt-mark unhold <package name>

After that, you should be able to remove the conflicting package (it seems to be npm) and then reinstall all.

If this fail, you can try the aptitude way --- often it's able to disentangle dependency trees better.

In both cases, be careful when applying commands, and check carefully the list of packages that are marked for remove.


For me to solve this problem, I just had to install synaptic first using below commmand, and then everything works fine.

sudo apt-get install synaptic