
    Carl E. COOK, Petitioner-Appellant, v. Jack A. HANBERRY, Warden, United States Penitentiary, Atlanta, Georgia, Respondent-Appellee.
    No. 78-2538
    Summary Calendar.
    
    United States Court of Appeals, Fifth Circuit.
    March 29, 1979.
    Opinion Revised June 6, 1979.
    See 596 F.2d 658.
    
      Carl E. Cook, pro se.
    William A. Harper, U. S. Atty., Barbara A. Harris, Asst. U. S. Atty., Atlanta, Ga., for respondent-appellee.
    Before COLEMAN, FAY and RUBIN, Circuit Judges.
    
      
       Rule 18, 5 Cir.; see Isbell Enterprises, Inc. v. Citizens Casualty Co. of New York et al., 5 Cir., 1970, 431 F.2d 409, Part I.
    
   PER CURIAM:

A federal prisoner currently serving sentences for bank robbery and assaulting a fellow inmate with a deadly weapon, Cook filed a pro se petition, styled under 28 U.S.C. § 2255, seeking release or return from the Atlanta Prison where he was then incarcerated to a facility on the West Coast where he had previously been confined.

The general rule in federal cases requires that an actual controversy exist at all stages of appellate review, “and not simply at the date the action is initiated.” Roe v. Wade, 1972, 410 U.S. 113, 125, 93 S.Ct. 705, 712, 35 L.Ed.2d 147. Insofar as Cook’s petitions sought relief in the form of a transfer back to a West Coast facility, the issue has become moot. See McRae v. Hogan, 5 Cir. 1978, 576 F.2d 615, 616-17.

The prisoner asserts the additional claim, not moot, that he is entitled to release because the treatment accorded him by the prison officials violated the Eighth Amendment.

Assuming arguendo that his allegations of mistreatment demonstrate cruel and unusual punishment, the petitioner is still not entitled to release from prison. Habeas corpus is not available to prisoners complaining only of mistreatment during their legal incarceration. Granville v. Hunt, 5 Cir. 1969, 411 F.2d 9, 12-13; see also, Williams v. Steele, 8 Cir. 1952, 194 F.2d 917, cert. denied, 344 U.S. 822, 73 S.Ct. 20, 97 L.Ed. 640. The relief from such unconstitutional practices, if proved, is in the form of equitably-imposed restraint, not freedom from otherwise lawful incarceration. See Konigsberg v. Ciccone, W.D.Mo. 1968, 285 F.Supp. 585, 589, aff’d, 8 Cir. 1969, 417 F.2d 151, cert. denied, 397 U.S. 963, 90 S.Ct. 996, 25 L.Ed.2d 255 (1970). This is because the sole function of habeas corpus is to provide relief from unlawful imprisonment or custody, and it cannot be used for any other purpose. See Rheuark v. Shaw, 5 Cir. 1977, 547 F.2d 1257, 1259; Hill v. Johnson, 5 Cir. 1976, 539 F.2d 439, 440; Pierre v. U. S., 5 Cir. 1976, 525 F.2d 933, 935-36.

The petitioner’s attack on the transfer to Atlanta lacks merit, Beck v. Wilkes, 5 Cir. 1979, 589 F.2d 901, 903-04 (1979), and the Eighth Amendment allegations do not entitle him to release from custody. See Granville v. Hunt, 5 Cir. 1969, 411 F.2d 9, 12-13, Konigsberg v. Ciccone, W.D.Mo.1968, 285 F.Supp. 585, 589, aff’d. 3 Cir. 1969, 417 F.2d 161, cert. denied, 397 U.S. 963, 90 S.Ct. 996, 25 L.Ed.2d 255 (1970).

For these reasons, the dismissal of the petition is AFFIRMED.  