'How to delete bulk EBS snapshot except for the latest one

I have redundant EBS snapshots tagged by name. I want to delete all with a name tag except the latest one. Is that possible through console or CLI?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source