I am writing my thesis. How do I get rid of plagiarized parts? How do I make sure that all my references are correct?
If you think/know that parts of your thesis are plagiates you and/or your supervisors seem to have failed. You'll have to do as Tobias Kildetoft suggests in the comments, and rewrite those parts from scratch in your own words.
To check if your references are correct: read them.