592 F.2d 248
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.
Appeal from the United States District Court for the Northern District of Georgia.
Before COLEMAN, FAY and RUBIN, Circuit Judges.
PER CURIAM:


1
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.


2
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.


3
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.


4
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.


5
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).


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



*
 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


