I couldn't find an option on Logic Pro X to remove the legacy stuff in the library. The only options available are for installing new sounds.
Also I'd like to know whether those projects that make use of deleted sounds could be edited as normal, or will Logic prompt me to download only the missing sounds?
Update: I installed most of the legacy stuff from pkg files downloaded from the links here but I've deleted all the installers. I think if there is a way to know what files where installed by those packages I could find a way to remove only those files, maybe with a script to some third party tool, I guess.
Update: I was able to remove some packages using
pkgutil as explained in this gist, although I still don't know how to find what packages are the ones for the legacy stuff.