You can convert a local repository to a Federated repository using the Convert Local Repository to a Federated Repository REST API.
Converted Local Repositories Remain Federated
Removing the repository from the Federation does not automatically revert the repository to a local repository. Removing a repository from the Federation simply disconnects the bi-directional sync; however, the repository remains Federated.
The Federated repository cannot be converted back to a local repository.