How to remove a package from composer?

In the composer.json:
"require": {
...
...
 "phpmailer/phpmailer": "^6.0"
 },

Let's say I want to remove phpmailer from the project and remove the line from the requre, but the folders library will remain. There may be a command that would remove from composer.json and all folders from the server without fearing to miss something manually?
June 8th 19 at 16:50
1 answer
June 8th 19 at 16:52
Solution
composer remove vendor/package

This section of the base usage in the documentation of the composer is.

Find more questions by tags Composer