To get a shell in the **running** xcache container (as root, usually not nescessary)
```
nsenter --target=$(machinectl show --property Leader xcache | sed "s/^Leader=//") --all
```
inside, one can then switch to a shell as the xrootd user with e.g.
```
su -s /bin/bash xrootd
```
# Manually delete files from cache
This needs to be done inside the running container since it may need to clean up rucio metalink files from `dev/shm` which is currently a directory inside the container (not bind mounted).
So, as root do
```bash
nsenter --target=$(machinectl show --property Leader xcache | sed"s/^Leader=//")--all
```
And then
```bash
/var/local/xcache/rm_cached_file.sh <pattern>
# e.g. to delete all files starting with AOD.05536542