Use the following command (adjusting the time range accordingly) to remove log data for all sites
./console core:delete-logs-data --dates=2001-01-01,2019-04-08 --optimize-tables
NOTE: In my experience, this command only deletes data for sites that are currently configured in Matomo. I had to manually delete data for sites that are no longer configured.