to do sth badly or spoil sth
bugger sth up
I buggered up the exam.
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition