Polish President Lech Kaczynski and his brother Jaroslaw , the prime minister , have vowed to root out those in public life with close ties to the communist apparatus .