A Whole Foods in the heart of Silicon Valley was forced to shutter its prepared foods operation this week after health department inspectors discovered a vermin infestation. 

The Santa Clara County Department of Environmental Health ordered a Cupertino Whole Foods  to close its deli, bakery and juice bar following a failed health inspection on Monday, according to health department records. 

The rest of the grocery store, located on Stevens Creek Boulevard less than 3 miles from Apple headquarters, remained open to the public, according to a Whole Foods spokesperson.  

“We’re working closely with local health officials to restore full service once the repairs are completed thoroughly to support our high standards,” the spokesperson said in a Friday statement. “Food safety is our top priority, and we apologize to our customers for any inconvenience.” 

Details from the Monday inspection were not immediately available, but health department records show that inspectors found major health violations at the Whole Foods location. 

During a March 25 inspection, the health department found rodent droppings throughout the facility, including in the deli preparation area, as well as several “snap traps,” according to an inspection report. Inspectors also said they found German cockroaches, dead and alive, in the bakery area. 

The department ordered the Whole Foods deli and bakery to shut down, but found the store back in compliance during inspections over the next several days. The store had reportedly been sanitized by a pest control service and an exterminator, who caught a “roof rat,” according to a March 26 report. 

After temporarily re-opening, however, both the deli and bakery were shut down again Monday, records show. 

The health department did not immediately respond to a request for comment. Online records show that the agency suspends permits when inspectors find an “imminent threat to health and safety,” and that facilities must be closed until the violation is corrected.

Reach Anna Bauman: anna.bauman@sfchronicle.com