Ybarra appeals from the district court’s summary judgment against him in a civil rights action brought under 42 U.S.C. § 1983, for damages and declaratory relief. We affirm.
FACTS
Ybarra was arrested by Reno police on August 25, 1974 after a shooting in his mobile home. He remained in custody until October 11, 1974 when he was released on bail pending trial.
Malloy, a deputy district attorney for Washoe County, was assigned to the case and prosecuted Ybarra. In his capacity as prosecutor, he was empowered to have the alleged crime scene, the mobile home, secured and preserved as evidence. On or about September 6, 1974 and after the police had completed their investigation of the mobile home, Malloy authorized the release of the mobile home.
*677On April 15, 1975, Ybarra was convicted of first degree murder and subsequently sentenced to life imprisonment. He is presently serving that sentence.
On September 3, 1976, Ybarra filed a pro se suit seeking damages and declaratory relief pursuant to 42 U.S.C. § 1983 and 28 U.S.C. §§ 2201-2202. He filed amended complaints on January 26, 1979 and June 10, 1981. He alleged that the defendants had violated his rights by moving his mobile home or by allowing others to tamper with it and his possessions.1 He claimed damage to the home and a loss of possessions. He also claimed the defendants destroyed or permitted the destruction of exculpatory evidence needed for his defense to the murder charge.
On February 9, 1981, Rose, Malloy and the County of Washoe filed a motion for summary judgment. The motion was reviewed on July 17. On December 30, 1981, the district court entered summary judgment in favor of Rose, Malloy and Washoe County. Ybarra filed a timely notice of appeal.
STANDARD OF REVIEW
Summary judgment is appropriate only when no genuine issue of material fact exists and the moving party is clearly entitled to prevail as a matter of law. State ex rel. Edwards v. Heimann, 633 F.2d 886, 888 (9th Cir.1980); Real v. Driscoll Strawberry Associates, 603 F.2d 748, 753 (9th Cir.1979). We view the evidence in the light most favorable to Ybarra in order to determine whether there was a genuine issue as to any material fact.. Reed v. Lockheed Aircraft Corp., 613 F.2d 757, 759 (9th Cir.1980); Ramirez v. National Distillers & Chem. Corp., 586 F.2d 1315, 1318 (9th Cir.1978).
DISCUSSION
A. Malloy
The trial court concluded that, under Imbler v. Pachtman, 424 U.S. 409, 96 S.Ct. 984, 47 L.Ed.2d 128 (1976), Deputy District Attorney Malloy was protected from damage liability under § 1983 by either absolute or qualified immunity. Ybarra contends that, when Malloy authorized the release of the mobile home, he was acting in an investigative capacity, which warrants only qualified immunity. He also contends that a genuine issue of .material fact exists as to whether Malloy is entitled to even qualified immunity. We conclude the district court was correct in holding that Malloy is absolutely immune, as a matter of law, from damages liability under § 1983.
The leading case on the scope of prosecutorial immunity is Imbler v. Pachtman, 424 U.S. 409, 96 S.Ct. 984, 47 L.Ed.2d 128 (1976), in which the complaint, filed under § 1983, alleged that the prosecutor knowingly introduced perjured testimony. The Supreme Court held the prosecutor was absolutely immune from a § 1983 suit for damages for his quasi-judicial activity. Id. at 430-31, 96 S.Ct. at 994-95. In so holding, the Court concluded that the public trust of the prosecutor’s office would suffer if the prosecutor, in making his or her decisions, were constrained by the threat of potential liability in a suit for damages. Id. at 424-25, 96 S.Ct. at 992-93. The Court relied on a statement by Judge Learned Hand:
As is so often the case, the answer must be found in a balance between the evils inevitable in either alternative. In this instance it has been thought in the end better to leave unredressed the wrongs done by dishonest officers than to subject those who try to do their duty to the constant dread of retaliation.
Id. at 428, 96 S.Ct. at 994 (quoting Gregorie v. Biddle, 177 F.2d 579, 581 (2d Cir.1949), cert. denied, 339 U.S. 949, 70 S.Ct. 803, 94 L.Ed. 1363 (1950)). The Court emphasized, however, that criminal sanctions are available to deter prosecutorial misconduct or to *678punish that which occurs. Id. 424 U.S. at 428-29, 96 S.Ct. at 994.
Absolute prosecutorial immunity exists if the prosecutor acts within the scope of his or her authority and in a quasi-judicial capacity. Id. at 430-31, 96 S.Ct. at 994-95; Beard v. Udall, 648 F.2d 1264, 1271 (9th Cir.1981) (per curiam). The focus of the analysis, particularly under the second prong, is on the nature or function of the prosecutor’s activity. See Imbler, 424 U.S. at 430-31, 96 S.Ct. at 994-95; Mancini v. Lester, 630 F.2d 990, 992 (3d Cir.1980). If the prosecutor acts as an advocate “in initiating a prosecution and in presenting the state’s case,” absolute immunity is warranted. Imbler, 424 U.S. at 430-31, 96 S.Ct. at 994-95. The Court, however, left open the question of whether absolute immunity attaches to a prosecutor’s acts that are functionally administrative or investigative. Id. at 430-31, 96 S.Ct. at 994-95. Beard, 648 F.2d at 1271 n. 8. Thus, we hold that the decision to release evidence, under the circumstances of this case, was an exercise of the prosecutorial function entitled to absolute immunity under the reasoning of Freeman. Freeman on Behalf of the Sanctuary v. Hittle, 708 F.2d 442, 443 (9th Cir.1983) (per curiam).
Here Ybarra alleged that Malloy knowingly breached his duty to preserve exculpatory material and that such a breach constitutes a denial of due process under Brady v. Maryland, 373 U.S. 83, 87, 83 S.Ct. 1194, 1196, 10 L.Ed.2d 215 (1963). Under the first prong of the test, Ybarra contends that Malloy’s action cannot fall within his scope of authority because it is unconstitutional.
The same argument was advanced and rejected in Briggs v. Goodwin, 569 F.2d 10, 15-16 (D.C.Cir.1977), cert. denied, 437 U.S. 904, 98 S.Ct. 3089, 57 L.Ed.2d 1133 (1978). There the court correctly concluded that such logic would totally abrogate the immunity doctrine because “any allegation that an official, acting under color of law, has deprived someone of his rights necessarily implies that ... the official exceeded his authority.” Id. at 15. As a result, the court held that the proper test for detaining scope of authority is whether the prosecutor performed a kind of act not “ ‘manifestly or palpably beyond his authority’, but rather ‘having more or less connection with the general matters committed to his control or supervision.’ ” Id. at 16 (quoting Spalding v. Vilas, 161 U.S. 483, 498, 16 S.Ct. 631, 637, 40 L.Ed. 780 (1896)). Such a test is consistent with our recent decision in Beard, 648 F.2d at 1271. Applying this guideline here, we conclude that, when Malloy gave the order to release Ybarra’s trailer, he was acting well within his authority as a deputy district attorney, empowered to preserve or to release the alleged crime scene as evidence.
Ybarra’s second contention concerns the second prong of the test — whether the challenged activity is quasi-judicial. He argues that Malloy is entitled to only qualified immunity because the release of the mobile home was not a quasi-judicial act. In support, Ybarra contends that the release occurred before the start of grand jury proceedings or any other formal incident of prosecution, and that Malloy’s order was ministerial.
We conclude first that the precise timing of the release is not dispositive on the question of the nature of the activity. A similar argument was rejected in Briggs because it was recognized that “the advocate’s role could entail certain ‘actions preliminary to the initiation of a prosecution and actions apart from the courtroom.’ ” 569 F.2d at 23 (quoting Imbler, 424 U.S. at 431 n. 33, 96 S.Ct. at 995 n. 33). Secondly, we note that the ministerial-discretionary analysis urged upon us by Ybarra has given way to the functional analysis set forth in Imbler. Id. at 16 n. 7. The proper focus, it must be emphasized, is on the nature of the challenged activity.
Employing this functional analysis, we conclude that Malloy’s release of the mobile home was a quasi-judicial act that entitled him to absolute immunity. The fact is that Malloy authorized the release of the home after Ybarra was placed in custody and after the police had concluded their investí*679gation of the alleged crime scene. At that point, the inquiry by Reno police as to whether Malloy wished the mobile home secured and preserved as evidence was directed to Malloy as both an advocate in preparation of his prosecution of Ybarra, and as an officer of the court whose duty to do justice encompassed at least a duty to inform Ybarra of evidence Malloy knew to be exculpatory. See Brady v. Maryland, 373 U.S. 83, 87, 83 S.Ct. 1194, 1196, 10 L.Ed.2d 215 (1963). Hence, we need not reach the merits of the Brady question2 to find Malloy absolutely immune from § 1983 damage liability.
First, we hold that, insofar as Malloy’s decision to release the home can be characterized as investigative, as Ybarra contends, our recent decision in Freeman bars relief. In Freeman we held, “[ijnvestigative functions carried out pursuant to the preparation of a prosecutor’s case also enjoy absolute immunity.” 703 F.2d at 443 (citations omitted).
Second, we note that the Imbler court recognized that “[preparation, both for the initiation of the criminal process and for a trial, may require the obtaining, reviewing, and evaluating of evidence. At some point, and with respect to some decisions, the prosecutor no doubt functions as an administrator rather than as an officer of the court.” 424 U.S. at 431 n. 33, 96 S.Ct. at 995 n. 33. In acting either to preserve or release evidence, the primary consideration, viewed objectively, is whether the prosecutor needs the evidence to prosecute. Clearly this consideration concerning the sufficiency of available evidence cannot be characterized as merely administrative or, as suggested by Freeman, merely investigative. This decision goes to the heart of the advocate’s role “in initiating a prosecution and in presenting the State’s case.” Imbler, 424 U.S. at 431, 96 S.Ct. at 995. See also Simons v. Bellinger, 643 F.2d 774, 784-85 (D.C.Cir.1980) (immunity attaches when activity focuses on particular criminal proceeding). Malloy’s concern over the administrative problems associated with preserving the home as evidence does not strip the act of its prosecutorial functions.3 The analysis is objective; we are not concerned with Malloy’s thought process or his intent. Thus, we hold that, insofar as the decision to release thq home can be characterized as administrative, as Ybarra contends, the reasoning behind Freeman also applies. Because the function was carried out pursuant to the preparation of the prosecutor’s case, it also warrants absolute immunity.
Moreover, assuming arguendo Malloy had a duty to preserve the evidence under these facts, that duty would arise from his role as an officer of the court charged to do justice. See Brady v. Maryland, 373 U.S. 83, 87, 83 S.Ct. 1194, 1196, 10 L.Ed.2d 215 (1963). An act or an omission concerning such a duty cannot be construed as only administrative or investigative; it too is necessarily related to Malloy’s preparation to prosecute. See Imbler, 424 U.S. at 431 n. 33, 96 S.Ct. at 995 n. 33.
Finally, we agree with the district court that Ybarra’s claim is the type of claim against which the Imbler court wished to immunize. As the district court stated,
In this ease, the gravamen of the plaintiffs’ claim [is] that the prosecutor suppressed or failed to preserve potential evidence thereby denying the plaintiff due process and a fair trial. The plaintiff is trying to subject the prosecutor to liability and damages for his subsequent imprisonment. In order to prevail, plaintiff must prove that he was denied a fair trial by the suppression of evidence which would in effect require a virtual retrial of the criminal offense in a new forum and the resolution of some highly technical issues by a lay jury. This is exactly the type of claim the United States Supreme Court, in its wisdom, wanted to prevent and recognized would be better handled *680by various post trial remedies available to those who stand convicted of a criminal offense.
We also note that, as in Imbler, 424 U.S. at 428-29, 96 S.Ct. at 994, criminal sanctions for obstruction of justice are available here to punish proven misconduct.
Ybarra relies on Henderson v. Fisher, 631 F.2d 1115 (3rd Cir.1980) (per curiam). In Henderson, the court held that the prosecutor’s alleged knowing failure to prevent the removal of certain exculpatory material on the day of trial warranted qualified instead of absolute immunity. Id. at 1120. The court reasoned that such a knowing failure could not be construed as “presenting the State’s case” under Imbler. Id.
We reject the Henderson court’s reasoning because it reflects the scope-of-authority logic rejected in Briggs. In essence, the Henderson court erroneously merged the two prongs of the immunity test by: (1) adopting that illogic and (2) applying, as a remedy, the qualified immunity reserved for non-quasi-judicial activity. In short, the Henderson court ignored the admittedly harsh policy expressed in Imbler of leaving “unredressed the wrongs done by dishonest officers [instead of subjecting] those who try to do their duty to the constant dread of retaliation.” 424 U.S. at 428, 96 S.Ct. at 994. Thus, Malloy’s decision to release the mobile home entitles him to absolute immunity.
B. Rose
Ybarra alleged that Washoe County District Attorney Robert Rose is liable under § 1983 for failure to train his subordinate Malloy to preserve exculpatory evidence, or in the alternative, for permitting a policy of not preserving exculpatory evidence to exist in the District Attorney’s Office. He contends on appeal that the district court erred in finding no evidence to support the allegations.
Q. Isn’t it true that at that time when you were advised that the Reno Police had finished their investigation and that certain people wanted custody of the mobile home that if you, as a Deputy District Attorney, had had any reason to retain the mobile home as evidence you could have made such a request to do so of the Reno Police Department?
A. Yes. My answer is still the same. The answer is yes. I could have requested it, but that answer deserves an explanation, sir.
Q. Now, you had no reason to actually request it be held; is that true?
A. None that I thought of at the time, no.
Q. In other words, if you had thought that for some evidentiary reason it was important to hold the trailer you would have asked the Police Department to do so, wouldn’t you?
A. Not necessarily. I could have requested it.
That was your first question. And the answer to that question is I could have requested it, but there are a lot of reasons why I might not have requested it.
Q. All right. What were the reasons that you did not request in this instance?
A. Because I had had enough experience by then with the logistical problems that the *681Police Department have from time to time with much smaller items than a doublewide mobile home — or I don’t know. Maybe this wasn’t a doublewide. But I think as I recall it was. That if I’d have said, “Would you hold onto that, please, and keep it for who knows how long,” I would have gotten a great deal of protest from other eyes to the extent that I probably would have been overruled.
Q. And who would have had the authority as far as you know to overrule you at that time?
A. Well, the Police Department could do whatever they pleased with the item, regardless of what I requested, first of all.
And secondly, I am certain that I would have heard from above. '
Q. You are saying that even if you would have believed or suspected that there might be material evidence in the trailer, you could have been reluctant to ask the Police Department to hold it because of the administrative problems that it would create?
A. Among other things, yes. I have no idea where they would keep a doublewide mobile home.
*680A supervisor cannot be held personally liable under § 1983 for the constitutional deprivations caused by his subordinates, absent his participation or direction in the deprivation. May v. Enomoto, 633 F.2d 164, 167 (9th Cir.1980). We conclude first that, if Ybarra’s allegation is to be understood to mean that Rose was directly involved in the decision not to preserve the mobile home, he too would enjoy the same absolute prosecutorial immunity which shields Malloy. Secondly, we conclude that no evidence supports the imposition of liability on Rose, for either failing to train Malloy to preserve evidence or permitting a custom or policy of not preserving evidence to exist in the prosecutor’s office.
Other courts have recognized a cause of action under § 1983 where it was alleged that a supervisor’s failure to train or to supervise personnel led to the deprivation of constitutional rights, see McClelland v. Facteau, 610 F.2d 693, 696 (10th Cir. 1979), or where it was alleged that a policy existed that led to the deprivation of constitutional rights. See Wanger v. Bonner, 621 F.2d 675, 679-81 (5th Cir.1980).
Here Ybarra relies on Malloy’s testimony in Ybarra’s habeas corpus evidentiary hearing.4 Even when viewed in a light most *681favorable to Ybarra, the testimony fails to give rise to any inference that Rose either trained Malloy inadequately, or failed to supervise Malloy properly. See McClelland, 610 F.2d at 697, (showing of violation alone insufficient to raise issue of fact). The district court correctly concluded that there is no evidence that Rose knew or should have known of the alleged misconduct and yet failed to act to prevent future harm. Cf. id. at 697-98. (Evidence of knowledge raised issue of fact). Similarly, the testimony fails to give rise to an inference that it was the custom or policy of Rose and the Washoe County District Attorney’s Office to fail to preserve evidence in order to deprive criminal defendants of a fair trial. Cf. Wanger, 621 F.2d at 680-81 (evidence of affirmative policy necessary for liability.) Accordingly, we conclude that the district court correctly found that Ybarra failed to establish a colorable issue of deliberate misconduct against Rose. See Enomoto, 633 F.2d at 167.
C. Washoe County
Although local governments cannot be held liable under § 1983 on a theory of respondeat superior, they can be held liable for constitutional deprivations covered by their policies or customs. Monell v. New York City Dep’t of Social Services, 436 U.S. 658, 690-91, 98 S.Ct. 2018, 2035-36, 56 L.Ed.2d 611 (1978). They enjoy no immunity under § 1983 for damages. Owen v. City of Independence, 445 U.S. 622, 657, 100 S.Ct. 1398, 1418, 63 L.Ed.2d 673 (1980).
Because we fail to perceive an inference from Malloy’s testimony that such a policy or customs existed in Washoe County, we conclude that no triable issue of material fact exists on this claim.
D. Declaratory Relief
Ybarra contends that the district court failed to address his claim for declaratory relief under 28 U.S.C. §§ 2201-2202. He argues the district court failed to determine whether he suffered a constitutional deprivation under Brady v. Maryland, 373 U.S. 83, 83 S.Ct. 1194, 10 L.Ed.2d 215 (1963), absent the immunity consideration. We conclude that the exclusive remedy for this determination lies in habeas corpus and affirm the "district court judgment on a different basis supported by the record. United States v. County of Humboldt, 628 F.2d 549, 551 (9th Cir.1980).
Because jurisdiction has been established under § 1983, the separate remedy of declaratory judgment is available. See Skelly Oil Co. v. Phillips Petroleum Co., 339 U.S. 667, 671-72, 70 S.Ct. 876, 878-79, 94 L.Ed. 1194 (1950); Alton Box Board Co. v. Esprit De Corp., 682 F.2d 1267, 1274 (9th Cir.1982). A declaratory judgment may be appropriate in a civil rights case in addition to injunctive relief or damages. See, e.g., Evers v. Dwyer, 358 U.S. 202, 203, 79 S.Ct. 178, 179, 3 L.Ed.2d 222 (1958) (per curiam). It is undisputed, however, that the exclusive federal remedy for a state prisoner seeking release from confinement is habeas corpus, with its attendant requirement of exhaustion of state remedies. Preiser v. Rodriguez, 411 U.S. 475, 499 n. 14, 93 S.Ct. 1827, 1841 n. 14, 36 L.Ed.2d 439 (1973). If a prisoner seeks both release from confine*682ment and damages or injunctive relief in an action under § 1983, the court may properly dismiss the former claim while retaining the latter. Wolff v. McDonnell, 418 U.S. 539, 554-55, 94 S.Ct. 2963, 2973-74, 41 L.Ed.2d 935 (1974); see Smallwood v. Missouri Bd. of Probation & Parole, 587 F.2d 369, 371 (8th Cir.1978) (per curiam) (dismissal for failure to bring in habeas corpus and to exhaust attendant state remedies).
Here Ybarra seeks declaratory relief that, under Brady, Malloy has violated his right to a fair trial. Although it is unclear how the district court addressed this claim, the proper approach is to determine whether Ybarra’s initial and exclusive remedy lies in habeas corpus. See Fulford v. Klein, 529 F.2d 377, 381 (5th Cir.1976), aff’d on rehearing en banc, 550 F.2d 342 (1977) (propriety of actions brought under section 1983 not determined solely on basis of relief sought). See also Silverton v. Department of Treasury, 644 F.2d 1341, 1345 (9th Cir.), cert. denied, 454 U.S. 895, 102 S.Ct. 393, 70 L.Ed.2d 210 (1981); Delaney v. Giarrusso, 633 F.2d 1126, 1128 (5th Cir.1981 (per curiam) (if habeas corpus is proper, then plaintiff-appellant may also be precluded from raising the issue in the section 1983 action). It is clear the basis of Ybarra’s claim is a challenge to the constitutionality of his conviction; in order to prevail on this claim, he must collaterally void his state court conviction. See Silverton, 644 F.2d at 1345 (due process claim). Although he does not specifically request release, the finding of such declaratory relief in his favor would show that release was required. See Preiser, 411 U.S. at 500, 93 S.Ct. at 1841 (if relief sought is determination that state prisoner is entitled to immediate release then habeas corpus is sole remedy); Delaney, 633 F.2d at 1128; Wolff, 418 U.S. at 554-55, 94 S.Ct. at 2973-74.5 Each of the alleged violations of Ybarra’s constitutional rights can be redressed in the pending federal habeas corpus action assuming the record shows exhaustion of his state remedies. Under such circumstances, we see no valid purpose for the maintenance of this claim for declaratory relief until the habeas corpus petition has been finally determined. It is quite possible that the resolution of that matter will dispose of justiciable claims without the need for an action under section 1983.
AFFIRMED.
. The defendants named in the suit included not only Rose, Malloy and the County of Washoe, but also several Reno police officers, the City of Reno, the owners and operators of the mobile home village and Ybarra’s credit union. By stipulation the action was dismissed in August and October of 1981 as to all the named defendants except Rose, Malloy and the County of Washoe.
. See, e.g., United States v. Ellsworth, 647 F.2d 957, 961 n. 8 (9th Cir.1981), cert. denied, 456 U.S. 944, 102 S.Ct. 2008, 72 L.Ed.2d 465 (1982) (four requirements for due process violation).
. Ybarra relies chiefly on testimony by Malloy in a habeas corpus proceeding. See infra note 4.
. On direct examination by Ybarra’s attorney, Malloy testified:
. In Wolff, 418 U.S. at 555, 94 S.Ct. at 2974, the Court stated, “Such a declaratory judgment as a predicate to a damages award would not be barred by Preiser; and because under that case only an injunction restoring good time improperly taken is foreclosed, neither would it preclude a litigant with standing from obtaining by way of ancillary relief an otherwise proper injunction enjoining the prospective enforcement of invalid prison regulations.” Here, in contrast, the declaratory judgment does not operate as a predicate to the damages award, nor does it operate prospectively. Ybarra represents no class, nor does he seek an injunction against future misconduct.