Santa Clara Valley residents, under state orders to strip all fruit and vegetables from their backyards and orchards, responded angrily today to plans to drop pesticides over populated areas in the battle to control the Mediterranean fruit fly.

Some officials urged residents to leave. "I don't know where I'll go but I intend to leave," said Santa Clara County Supervisor Zoe Lofgren.

City councils of several communities attempted to get restraining orders to halt the aerial spraying until a full hearing could be held on the health effects of the pesticide malathion.

But unless a court injunction is issued Monday, helicopters loaded with malathion will take off early Tuesday for an aerial spraying program ordered by Gov. Edmund G. Brown Jr. after the U.S. Department of Agriculture threatened a quarantine on California produce.

The 97-square-mile heart of the infestation will be sprayed with malathion at least six times, with the applications seven to 10 days apart, officials said.

The first application is expected to take a week and the others two to three days each, officials said. The first target area is a 15-square-mile section near Stanford University.

Agriculture Secretary John Block has warned that the spraying might not halt the pests, however, and said he still might have to impose a quarantine on 200 types of fruit and vegetables grown in California.

State agriculture officials, while insisting that the chemical posed no health threat, urged residents to stay inside, cover their cars and bring children's toys inside during the 2 a.m. to 6 a.m. sprayings.

Sunnyvale City Councilman Larry Stone predicted that "an exodus will create incredible security problems; the area will be open to every residential burglar if people leave, and many will."

The Red Cross said it would open shelters for people leaving their homes during the spraying. But Pete Ashen, director or Red Cross disaster services for Northern California, stressed that "this is not an emergency evacuation. Leaving the area is a personal choice." "

Ashen said the shelters would be primarily for those with health problems that might be aggravated by the spraying.