What has been said above is a good way to at least reduce the bacterial load but I don't even bother doing that because at the end of the day you can't really eradicate it. Throwing it away will only dig a deeper hole in your bank account though without the warranty you will not have BGA in your next tank. Some people think they can control over what is in their tanks, but that is mere wishful thinking, specially when it comes to cyanobacteria. If you had a BGA outbreak it's because the conditions where there for it to develop. BGA will come back whether you want it or not throught water, plants, fish, air, tools.... You would basically need to live in a bubble cut from the world to make sure it doesn't come back anymore.
So I would dry the soil, bake it if you want, but you will need to find out why BGA is developing. IME warmers temps usually tends to stimulate their development. Too much of a low N content also contributes to their development. There are many other factors and no definitive answers but it would be a shame to throw perfectly fine soil.