Pinning of spiral waves by defects in cardiac muscle may cause permanent tachycardia. We numerically study the removal of a pinned spiral by a localized stimulus at the boundary of a two-dimensional excitable medium. It is shown that target waves may be generated by an external local force, and then the target waves will interact with the pinned spiral. When the external force is appropriately chosen, the generated target waves may suppress the pinned spiral, and the system is finally dominated by the target waves.