rm -dr is a Unix/Linux command to remove something. In this case, the options -d and -r tell the rm command to remove a directory and recursively (i.e. subdirectories too). But I think it's missing a -f argument because rm won't by default remove non-empy directories. You can run commands from within PHP by using system(), although it's not really recommended unless you really have to use it.
Anyway, what do you mean by "not in use"?
Diego