When he died, when he rigged the Overlook to blow, the ghosts died with him - Dan knew that. But the problem was, that now? He wasn't actually dead. The ghosts of the Overlook were back in their cramped homes, on a dusty shelf and starved for food - they couldn't hunt, they couldn't feed, they could only continue to exist and be this itch at the back of his skull.
"What would total banishment entail?" he asked, resting his hand on John's knee. Maybe he just liked touching because for Dan, the ghosts were quieter around him - less of a heavy presence, anyway. Perhaps they were afraid of John. Dan could see why.