Although a handful of states recently voted in favor of capital punishment, death penalty opponents have had victories in the courts in the past several years. Consider, for a couple examples, the decisions affecting Florida's and Connecticut's systems.
Delaware is among the recent states to lose the death penalty due to an appeals court ruling. In August of 2016, the Delaware Supreme Court determined that the state's law on death penalty sentencing law was unconstitutional. (The state high court found that the law gave judges--as opposed to juries--too much power in setting death sentences.)
But that wasn't the end of the matter. Four months later, in December 2016, the same court held that the decision striking down the death penalty was retroactive. The court's December opinion meant that a man convicted of killing a police officer would be resentenced to life in prison. The decision also applied to other prisoners previously sentenced to death in Delaware.
For a snapshot of the jurisdictions that do and don't have the death penalty, you can see the Death Penalty Information Center's map.