Theoretically, Ghosts are vulnerable to electomagnetic distortion or intense light, so, purely hypothetically, magnesium-coated ammunition or EMP weapons could temporarily rid one of a ghost. Exorcisms sometimes work but only in the case of hostile spirits and they're usually only a temporary solution.
In practice, Ghosts are tied to the world of the living due to extraneous circumstances. Solving that issue severs that connection and forces them to move onto the hereafter. If the ghost is benign, try to figure out what the fuck it wants, since usually it wants to do its ghost business and fuck off. A benign Ghost usually wants to settle some mild unfinished business and that's it.
Hostile Ghosts are a different matter entirely. Usually these Ghosts don't want to move onto their eternal reward and want to continue to be gigantic incorporeal pricks. In this case you need to figure out what led to the Ghost becoming malignant spirit in the first place. Usually its behavior will suggest the correct course of action: If it's a murderous spirit hell-bent on Revenge, for example, chances are that it wants revenge on its killer and bringing them to justice will end the bullshit, but every single one is different and you need to react accordingly.