60 F.3d 833NOTICE: Ninth Circuit Rule 36-3 provides that dispositions other than opinions or orders designated for publication are not precedential and should not be cited except when relevant under the doctrines of law of the case, res judicata, or collateral estoppel.
Le Roi JOHNSON, Plaintiff-Appellant,v.CONTRA COSTA COUNTY SHERIFF'S DEPARTMENT; Coleman Fanin,Julie Graham, Richard Hale, Contra Costa County,Lee Aldridge, Carolyn Keim, Rose Wolfand Herbert Kerlinger, et al.,Defendants-Appellees.
No. 93-16675.
United States Court of Appeals, Ninth Circuit.
Submitted June 26, 1995.*Decided July 3, 1995.

Appeal from the United States District Court, for the Northern District of California, D.C. No. CV-86-4975-DLJ; D. Lowell Jensen, District Judge, Presiding.
N.D.Cal.,
AFFIRMED IN PART, VACATED AND REMANDED IN PART.
Before:  O'SCANNLAIN, LEAVY and HAWKINS, Circuit Judges.


1
MEMORANDUM**


2
Le Roi Johnson, a former California state prisoner, appeals pro se the district court's dismissal of his 42 U.S.C. Sec. 1983 claim and the dismissal of his habeas claim.  We have jurisdiction pursuant to 28 U.S.C. Sec. 1291, and affirm in part, and vacate and remand in part.

A.  Section 1983 Claims

3
Johnson contends the district court erred by dismissing his section 1983 claim for failure to comply with the court's order to file an amended complaint.  This contention lacks merit.


4
Pursuant to Fed.  R. Civ. P. 41(b), the district court may dismiss an action where the plaintiff fails to obey an order of the court.  A dismissal under Rule 41(b) will not be disturbed unless we have "a definite and firm conviction that the court below committed a clear error of judgment in the conclusion it reached upon a weighing of the relevant factors."  Eldridge v. Block, 832 F.2d 1132, 1136 (9th Cir. 1987).


5
Johnson provides no explanation for his failure to comply with the district court's orders to amend his complaint.  The district court gave Johnson two opportunities to amend his complaint with specific directions.  The district court also warned Johnson that failure to file an amended complaint would result in the dismissal of his action.  We have reviewed the record and conclude that the district court did not abuse its discretion by dismissing Johnson's section 1983 claim for failure to file an amended complaint.  See id.

B.  Habeas Claim

6
Johnson's contention that the district court erred by dismissing his habeas claim has merit.


7
The district court dismissed Johnson's habeas claims on the basis that Johnson had been released from custody during the pendency of his appeal.  For habeas purposes, custody is measured at the time the petition is filed and subsequent release from custody does not destroy the statutory basis for jurisdiction.  See Carafas v. LaVallee, 391 U.S. 234, 238 (1968); Chacon v. Wood, 36 F.3d 1459, 1463 (9th Cir. 1994) (because of the possibility of future collateral consequences, a habeas petition is never moot simply because subsequent to its filing petitioner has been released from custody).  See also Garlotte v. Forcide, 115 S. Ct. 1948, 1951-52 (1995) (holding that petitioner serving consecutive sentences is "in custody" and may attack the sentence scheduled to run first, even after it has expired).  Because Johnson filed his habeas petition while still in custody, the district court erred by dismissing his habeas petition as moot.  Accordingly, we vacate and remand for further proceedings on Johnson's habeas claim.1


8
AFFIRMED in part, VACATED and REMANDED in part.



*
 The panel unanimously finds this case suitable for decision without oral argument.  Fed. R. App.  P. 34(a); 9th Cir.  R. 34-4


**
 This disposition is not appropriate for publication and may not be cited to or by the courts of this circuit except as provided by 9th Cir.  R. 36-3


1
 Johnson's motion for summary reversal is denied


