Rebuild thumbnails via WP Cli – how?

I can use wp media regenerate to regenerate thumbnails. But I need to rebuild first, before I can regenerate.

In the GUI of WordPress I have two buttons (if I have AJAX Regenerate Thumbnails plugin):

enter image description here

I need to click “Rebuild Thumbnails” and then “Regenerate Thumbnails” before my problem is fixed – I need to do this on thousands of images; is there an easy way to do this via the CLI?