This work describes a procedure for correcting inconsistent knowledge bases. It resolves contradictions with as few changes as possible and is introduced for abstract logic based on a consequence operator. Elementary properties, such as the existence of a correction or the unchangeability of a consistent knowledge base during correction, are theoretically proven. Since a correction may be incomplete, I explain how it can be completed consistently. Since it is not unique in general, the selection of a correction is explained on the basis of additional information. This work describes the implementation of the procedure in Answer Set Programming. Two examples are discussed: The books world models a scenario from robotics. The correction of inconsistent Sudokus demonstrates the performance of the procedure.