2

I executed these 2 commands:

composer require realrashid/sweet-alert
composer require infinety/alerts *@dev

They are packages to use SweetAlert on Laravel but they are not working and I found a better one, I want to remove them, when I do composer remove vendor/realrashid or composer remove vendor/infinety it say that the package is not installed and is not required in my composer.json, so It has not been removed but the package is still here..

Guilhem V
  • 361
  • 2
  • 7
  • 16
  • 3
    Remove the `vendor` folder and run `composer install` should fix. – Hedegare Nov 30 '17 at 12:33
  • 1
    Possible duplicate of [How to remove a package from Laravel using composer?](https://stackoverflow.com/questions/23126562/how-to-remove-a-package-from-laravel-using-composer) – Bhaumik Pandhi Nov 30 '17 at 12:34

3 Answers3

9

No need to use vendor. Just composer remove realrashid/sweet-alert.

common sense
  • 3,775
  • 6
  • 22
  • 31
1

Another way is to go to your composer.json file and then remove that certain package then recall the 'composer update' method. Since composer remove will completely remove the library to your composer cache because you might using that library to other projects so when you try to composer install again that library, composer will download that package again instead of checking the composer cache memory.

Kenneth Sunday
  • 865
  • 7
  • 14
0

you have to run this command in your terminal: composer remove vendor/package_name

  • Code without any explanation are rarely helpful. Stack Overflow is about learning, not providing snippets to blindly copy and paste. Please edit your question and explain how it answers the specific question being asked. See [How to Answer](https://stackoverflow.com/help/how-to-answer). – Sfili_81 Mar 21 '22 at 12:53