This is a feature request. It should be possible to remove all packages from a repository using Yum. For example, when the user wants to switch from Freshrpms to Livna, he probably wants to remove all packages from Freshrpms. Currently, there is no easy way provided to do so, as the Freshrpms packages do not have freshrpms in there name.
Putting the... sanity... of such a feature aside for the moment, it is possible to get the key belonging to a repo and then query/remove packages signed with that key. rpm -qa gpg-pubkey --qf "%{version}: %{summary}\n"
right now we just don't have any metadata available to us in the installed pkgs which would let us do this. In the future it is possible we might, however even then I do not think this would be enabled in the core yum functionality. It could, however, be in a plugin someone writes.