Remove lingering configuration data in block plugin I built a custom block plugin but after updating it there are configuration items that I no longer need. But removing the part that saves the configuration data in blockSubmit submit function doesn't actually remove the configuration data that existed before.

My original blockSubmit function was as follows

public function blockSubmit($form, FormStateInterface $form_state) {
        $this-&gt;configuration['row']       = $form_state-&gt;getValue('row');
        $this-&gt;configuration['columns']   = $form_state-&gt;getValue('columns');
}


But now I only want to store $this->configuration['columns'] like below

public function blockSubmit($form, FormStateInterface $form_state) {
        $this-&gt;configuration['columns']   = $form_state-&gt;getValue('columns');
}


Is there a way to delete the configuration data in $this->configuration['row'] ?
I don't mind it being a work around since I'm only going to be using it once. I wouldn't mind doing something like delete($this->configuration['row']); in the build function so it's removed when you visit a page that contains it.

Is there a way to remove this lingering configuration data in this block plugin?
There are several options.

You can unset the configuration 'row' in submit:

unset($this-&gt;configuration['row']);


You can load each block, remove the item from settings and save it. See https://drupal.stackexchange.com/a/224362/47547 how to load blocks. You can do this in an update hook.

You can export the configuration, remove the lines you don't want from the yaml files and import the configuration again. This would be the best option for a site owner who wants to clean up a single drupal installation.