
    Bruce A. ROUSE, Plaintiff-Appellant, v. Edmund G. BROWN, Jr.; et al., Defendants-Appellees.
    No. 13-15817.
    United States Court of Appeals, Ninth Circuit.
    Submitted June 12, 2014.
    
    Filed June 18, 2014.
    Bruce A. Rouse, Corcoran, CA, pro se.
    
      Before: McKEOWN, WARDLAW, and M. SMITH, Circuit Judges.
    
      
       The panel unanimously concludes this case is suitable for decision without oral argument. See Fed. R.App. P. 34(a)(2).
    
   MEMORANDUM

California state prisoner Bruce A. Rouse appeals pro se from the district court’s judgment dismissing his 42 U.S.C. § 1983 action alleging Eighth Amendment violations due to overcrowded prisons. We have jurisdiction under 28 U.S.C. § 1291. We review de novo a dismissal under 28 U.S.C. § 1915A. Hamilton v. Brown, 630 F.3d 889, 892 (9th Cir.2011). We may affirm on any ground supported by the record. Thompson v. Paul, 547 F.3d 1055, 1058-59 (9th Cir.2008). We affirm in part, reverse in part, and remand.

Dismissal of Rouse’s requests for injunc-tive and equitable relief was proper because Rouse’s exclusive federal remedy is a writ of habeas corpus. See Preiser v. Rodriguez, 411 U.S. 475, 500, 93 S.Ct. 1827, 36 L.Ed.2d 439 (1973) (“[W]hen a state prisoner is challenging the very fact or duration of his physical imprisonment, and the relief he seeks is a determination that he is entitled to immediate release or a speedier release from that imprisonment, his sole federal remedy is a writ of habeas corpus.”).

Dismissal of Rouse’s claim against Superior Court Judge Arthur Bocanegra was proper because he is immune from liability. See Ashelman v. Pope, 793 F.2d 1072, 1075 (9th Cir.1986) (en banc) (“Judicial immunity applies however erroneous the act may have been, and however injurious in its consequences it may have proved to the plaintiff.” (citation and internal quotation marks omitted)).

However, dismissal without leave to amend of Rouse’s claim for damages against Director Beard and Governor Brown in their individual capacities was an abuse of discretion because the complaint’s deficiencies could have been cured by alleging injuries suffered as a result of prison overcrowding. See Lopez v. Smith, 203 F.3d 1122, 1130-31 (9th Cir.2000) (en banc) (abuse of discretion to deny leave to amend when amendment was not futile); Akhtar v. Mesa, 698 F.3d 1202, 1212 (9th Cir.2012) (“[Bjefore dismissing a pro se complaint the district court must provide the litigant with notice of the deficiencies in his complaint in order to ensure that the litigant uses the opportunity to amend effectively.” (citation and internal quotation marks omitted)); see also Balla v. Idaho State Bd. of Corr., 869 F.2d 461, 471 (9th Cir.1989) (“Only when overcrowding is combined with other factors such as violence or inadequate staffing does overcrowding rise to an [Ejighth [Ajmendment violation.”).

Accordingly, we reverse the judgment in part and remand to allow Rouse an opportunity to file an amended complaint.

AFFIRMED in part, REVERSED in part, and REMANDED. 
      
       This disposition is not appropriate for publication and is not precedent except as provided by 9th Cir. R. 36-3.
     