After uninstalling all relevant modules with
drush un I have tried the following input and got the following output, but I don't think I did it correctly.
composer remove vendor/panels
vendor/panels is not required in your composer.json and has not been removed ./composer.json has been updated
Running composer update vendor/panels
Loading composer repositories with package information
Package "vendor/panels" listed for update is not locked.
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating autoload files 48 packages you are using are looking for funding.
composer fundcommand to find out more!