ItSolutionStuff.com

How to Remove Composer Package in Laravel?

By Hardik Savani • April 16, 2024
Laravel

Hi,

In this example, i will show you how to remove composer package in laravel. you can understand a concept of how to remove package in laravel. this example will help you laravel remove composer package. i would like to share with you laravel remove github package.

Here, i will give you very simple step to remove composer package from laravel application. you can use this step for remove composer package in laravel 6, laravel 7, laravel 8, laravel 9, laravel 10 and laravel 11 version.

In this example we will install dompdf composer package with following command:

composer require barryvdh/laravel-dompdf

If you installed by misteck above package then we can remove it by following step.

UnInstall Composer Package:

Remove providers and aliases

If you added providers and aliases for your composer package then you have to remove it as bellow screen shot:

config/app.php

Remove Package using Command:

Here bellow command to remove composer package. so let's see bellow syntax and command for remove dompdf package:

Syntax:

composer remove package_name

Example:

composer remove barryvdh/laravel-dompdf

Remove Config File:

Now we have to run following command to clear config file. so let's run as bellow:

php artisan config:clear

that's it.

i hope it can help you...

Tags: Laravel
Hardik Savani

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube

We Are Recommending You

Laravel 8 Send Mail using Queue Example

Read Now →

Laravel 8 Yajra Datatables Example Tutorial

Read Now →

Laravel 8 Import Export Excel and CSV File Tutorial

Read Now →

Laravel 8 PDF | Laravel 8 Generate PDF File using DomPDF

Read Now →

Laravel 5.6 - Log viewer using LogViewer package example

Read Now →

Laravel Prevent User to Enter Common Passwords Example

Read Now →

How to Install Composer using Command Line in Ubuntu?

Read Now →

How to Pass Data to All Views using Composer Share in Laravel?

Read Now →

How to Uninstall a Composer Package in Laravel?

Read Now →

Laravel Facebook authentication using Socialite Package

Read Now →

How to Generate Dynamic Sitemap in Laravel?

Read Now →

Laravel Database Backup using Laravel Backup Package

Read Now →