Correct, but do a huge water change first. If you blackout the tank first, you're not removing the nutrients the algae are removing. You could also find your fish dead from a huge CO2 spike after the algae dies in the already poor water conditions. By doing a considerable water change first and then cutting the lights you're removing both sources. Continue to do water changes on a regular basis, and test your water frequently. UV sterilizers are not needed (for algae at least) as long as your water parameters are kept within reason. Be careful what you add to the tank as well, as products with high phosporous, dissolved nitrate (plant fertilizers), or iron levels can cause algae blooms as well.