Without it "dropping down" later?
Never use a all purpose or other water based cleaners which contain a "butyl" component.
That particular surfactant loves to eat away glue, attack the foam, etc.
It is not always possible to get headliners "completely clean" without damaging the glue, fabric or foam liner, so keep that in mind.
Use a "huck" or "surgical" towel, fold it into a "quarter size", IE fold in half, then fold in half again to create a "pad".
Spray a non-butyl cleaner onto the "pad", never spraying any water based or other cleaners directly onto the headliner.
Do small areas, placing the "pad" flat to the cloth and agitate "gently", checking the "pad" for the soil coming off and transfering to the pad. When the pad shows the dirt transfered, flip the towel to a clean surface area and continue.
On a smokers car, you may go through 4 or 5 towels, as this removes the nicotine residue, which is what is a normal concern.
If there is "grease", spot, you may use the same pad technique, but using a quick flash solvent, unfortunately with current VOC regulations it is no longer possible to get perclore any more unless you are a dry cleaner and they are tightly regulated on it's usage.
I use lighter fluid (naptha), applying it to "pad" and follow the same method as with a water based, always checking the pad, and moving to a clean part of it.
NEVER SOAK A HEADLINER WITH ANY CHEMICAL CLEANER OR WATER!
There is a great, special brush that aids in this but they are around $25 or more each, called a "verlour spotting brush", and it has small, stiff, tight bristles that will agitate as well, just be careful and don't apply pressure, just gently agitate the areas with the brush after using the clean pad technique. This may release more nicotine and soil, so always go back over and check the worked area.
Follow up by wiping with a clean, dry huck towel, once again folded to a pad.
Does it work to completely clean ALL headliners, no, as there are variables, like some one got the material overly wet when attempting to clean it before and has "set" the soil, etc and/or created water spotting of the fabric.
Or the headliner is so old that the foam is already deteroiating and good luck.
These are the basics, take your time, practice and it should take care of the situation in over 90% of issue.
Grumpy