How can I delete a row from the database?
You can do it by using this code

$query = \Drupal::database()-&gt;delete('table');
$query-&gt;condition('some column', 'some condition');
$query-&gt;execute();