## remove_root()


Remove *directory* from the kernel roots and save (#48).


Usage

``` python
remove_root(
    directory,
    config=None,
)
```


Files on disk and database rows are untouched. `clean` drops the rows whose file is gone. The CLI equivalent is `skd config remove-root`.


## Parameters


`directory: str | Path`  
The root to remove.

`config: Config | None = None`  
A configuration to edit instead of loading the file.


## Returns


`Config`  
The updated configuration.


## Raises


`ValueError`  
*directory* is not a configured root, or it is the last one.
