Substract intersection of features

I have the model (a part) in the attached photo.
I want to cut from the red profiles, the intersection between the red profiles and the green profile.
The ideea is that I want to remain with some profiles that fit one into the others (the green one into the red ones). Lego style.

3 Answers

You could select a large face af green part....create a sketch on it....convert the face in sketch and then use "Extruded Cut"

Or you can use the same method you used to create the green part but instead use "Extrude" you use "Extruded Cut"

Thanks for your answers!
I tried the combine command but it cuts of from both elements.
The best thing seems to use sweep cut using the sketches that i used to create the green element, followed by sweep using the same sketches.