msck repair table <tablename> is often used in environments where the new partitions are loaded as directories on HDFS or S3 and users want to create the missing partitions in bulk. However, currently it only supports addition of missing partitions. If there are any partitions which are present in metastore but not on the FileSystem, it should also delete them so that it truly repairs the table metadata.
We should be careful not to break backwards compatibility so we should either introduce a new config or keyword to add support to delete unnecessary partitions from the metastore. This way users who want the old behavior can easily turn it off.