The fastest way to get mucus out of your lungs is to use some mucus medicine that helps you get the mucus produced more and then it gets the mucus out of your lungs.
You'll begin coughing up mucus more and then eventually the mucus will be all gone sooner than it would if you hadn't taken the mucus medicine.
Also keep the air moist using a vaporizer or humidifier as the moist air will help loosen the mucus which makes it easier for you to cough up the mucus that is being produced in your lungs.
Elevate your head when you sleep and when you need to cough up mucus or phlegm make sure to spit it out and when you feel like mucus is in your throat try coughing it up and get it out.
Drink plenty of warm liquids and water to help loosen the mucus as well which can help you get the mucus out of your throat.
You'll usually continue coughing up mucus for 4 to 7 days especially if you've had the flu or cold virus.