If you destroyed the sun - and thus all the planets around it, you would also alter the gravitational structure of this area of our galaxy. To me it makes no sense to destroy the sun to prevent anyone getting their hands on technology. Just destroy the technology, or empty the planet leaving...