Ineptitude is a difficult issue to combat because there are, obviously, different levels of ineptitude. They range from someone who is selectively disinterested in a specific task (I would argue this is the most frequent), all the way to completely dysfunctional. In the case of the latter, expedient dismissal is the best option. That being said, dismissal is a difficult issue to work with based upon your own organization’s policies regarding termination, and so, I won’t go into detail beyond documentation and getting them out as soon as is practical.
In the case of selective disinterest in certain pieces, however, there are some things you can do to help them to integrate more effectively into the team.