Hi,
In my case this command was not working ,so,i set up distributor again and then tried deleting the publisher and it worked.
Actually while deleting publisher replication first removes all the config/info about it from distributor.So if you delete it beforehand it errors out.Substitute one distributor,it will work.
Regards,
Jason