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.
Use the Convert Federated Repository to a Local Repository REST API to convert back to local, if required.