core: implement clear, list, and prune commands