I can relate to all of these. One way to get rid of them is to put them on a "special project". Something low stakes and inconsequential to keep them busy.
Better of course to engage with such people enabling them being productive. Or just buy them out of the contract.