Troy Czukoski pleaded guilty Friday.
Prosecutors charged the 42-year-old in March, saying they found more than 150 pornographic images of children stored electronically at his Exton home.
Czukoski had been the principal of Springton Lake Middle School in Delaware County.
Authorities say they seized two flash drives and 48 CDs and DVDs in an Oct. 18 search.
Authorities say they searched a movie production company that sold DVDs and streaming videos online featuring boys and found that Czukoski had been a customer.
His lawyer didn't immediately return a call seeking comment Friday. Previously, the lawyer said Czukoski is an adult survivor of childhood sexual abuse.
Sentencing has been set for Aug. 12.