For the first sentence, it could be "Apakah Anda yakin ingin menghapus semua pesan selama {days}?" I eliminate the word "apakah" because it has the same meaning as "are" to-be word so it is unnecessary. "Anda" means "you" in formal and can be eliminated in this context but I kept it to make the question more formal considering the whole text doesn't exceed the letter count limit. For the second sentence, "dibatalkan" means "be cancelled" and has closest meaning to "be undone" in this context.
For the second sentence, "dibatalkan" means "be cancelled" and has closest meaning to "be undone" in this context.