The defective chromatic number of a graph class is the infimum k such that there exists an integer d such that every graph in this class can be partitioned into at most k induced subgraphs with maximum degree at most d. Finding the defective chromatic number is a fundamental graph partitioning problem and received attention recently partially due to Hadwiger’s conjecture about coloring minor-closed families. In this paper, we prove that the defective chromatic number of any minor-closed family equals the simple lower bound obtained by the standard construction, confirming a conjecture of Ossona de Mendez, Oum, and Wood. This result provides the optimal list of unavoidable finite minors for infinite graphs that cannot be partitioned into a fixed finite number of induced subgraphs with uniformly bounded maximum degree. As corollaries about clustered coloring, we obtain a linear relation between the clustered chromatic number of any minor-closed family and the tree-depth of its forbidden minors, improving an earlier exponential bound proved by Norin, Scott, Seymour, and Wood and confirming the planar case of their conjecture.