In order to automatically unload the filament, go to the printer menu, click on Utilities/Filament and select unload:
Then, chose the hotend you want to unload the filament from, wait for it to preheat, and press next to unload the filament:
If the automatic filament unloading has failed, it can be due to the extruder grinding the filament. In order to unload the filament you can follow these steps:
Go to the temperature menu and heat the hotend to the printing temperature of the loaded filament. Once it has reached the target temperature, purge the extruder by clicking on the arrow.
At the same time, manually push the filament slightly in until you can see the material is coming out of the nozzle.
Keep pressing the purge button until you have extruded approximately 5 cm of filament and then try to unload the filament using the automatic unload assistant.
If this method does not work either, follow these steps:
Go to the purge menu and preheat the hotend to the loaded material printing temperature. Once the temperature is reached, carefully remove the bowden tube from the printing head while pressing the coupling.
Once you are able to remove it, filament may still be stuck on the hotend. If that's the case, bring the bowden as high as possible, and cut the filament so that there it at least 5 cm. of filament coming out of the printing head.
If the filament comes out along with the bowden, just cut the filament tip to prevent it from jamming inside the bowden tube.
Once that's done, press the clamp on the extruder motor while pulling from the filament.
Notice that the clamp to release pressure is different between R19 and R17 printers. Check the picture below to confirm the location of the clamp.
If you can't manually pull the filament, it's possible that it has been grinded inside the extruder motor. To unload it, remove the upper bowden connected to the extruder motor while pressing the coupling, and then cut the filament in the centre, so you have some extra filament to pull from on both the bowden and the extruder motor.
Once this is done, repeat the previous step, but this time, try both pulling and pushing the filament to remove it from the extruder motor.
If the issue continues, you'll have to disassemble the extruder motor, as explained in this article: