xbps-remove needs the right rootdir to not remove packages still required by repos. Without it it will just delete everything since it can't be found in any of the registered repositories.