Again, another untested idea for you. You should try it with one image first and Please! make sure your library is backed up first.
Select the Photos group from the Library pane to show all photos in the browser.
Set your view to Browser only.
Clear any filters in the top right if they are set.
Click the Filter icon at the top right.
If it's not already there, add the rule for "File Type" using the popup menu.
Set the filter to show Filetype Is RAW+JPEG.
You are now looking at all of your RAW+JPEG pairs in your entire library.
Make sure all the images are set to RAW as Master.
Select all the photos (test just one first!) and File->Relocate Masters. Choose an external disk with enough room.
Once all the masters are moved out of the library to a new location (this could take awhile if you have many photos), Navigate to the new location of the masters and remove the JPEGs. Sort by filetype in the Finder to make it easier.
Back in Aperture, Select all the RAW+JPEG pairs in the filtered browser and choose File->Consolidate Masters. (Now that the JPEGs are gone, I don't know if Aperture will complain. That's why you should test this first on 1 image)
If this worked, you should now have only RAW masters in your library.
I repeat myself: I didn't test this. Please test on a fully backed up library on only 1 image first. Good luck.