A former secondary teacher told police he is attracted to boys aged 12 years and over.
Robert Lightband, 69, who used to teach history at Menzieshill High, made the comment to officers after he was found with child porn.
Dundee Sheriff Court heard Lightband gave his computer tower to a repair technician on February 26 last year.
Fiscal depute Eilidh Robertson said: “The technician found references to teen boys and boys wrestling, and search terms for paedophile groups and young boys.
“The technician gave the tower to police and they examined it and found indecent images of children which had been attempted to be deleted.”
Indecent images of children were found on a memory stick seized from his home. Lightband admitted downloading images on the tower and putting some of them onto the device before giving the tower to the technician.
He also told officers he was attracted to boys aged 12 years old and over.
The fiscal said: “Six sexual images of boys were found and 2,000 images of boys, aged 12-16, in swimming shorts.”
Lightband, of Clepington Court, previously pleaded guilty to taking, or permitting to be taken or making indecent photographs or pseudo photographs of children, between June 16 2014, and February 25 2015, at his home.
Sentence was deferred until March 9 for reports.