A package can only be removed if nothing in the repo depends on it anymore. This also includes if it provides something and there is no real package with that name, and that provides is used somewhere.