Well they are greener - there is no question about that.
Question is how much.
They have a upfront cost due to batteries - mining/manufacturing lithium cells.
Power comes from various sources - but even coal is greener than disel or gasoline (much better filtering systems in place in a large scale powerplant than that small catalyzer in a car).
Then there is also the potential damage from old electric cars in the future if proper recycling is not in place.
A ICE is just a chunk of metal for the most part, Electric has batteries with a much bigger environmental impact.
Battery tech is holding electric back. And i wouldn't be amazed if oil is slowing battery tech progress (buying up startups/new technologies etc).