Php

How to Uninstall Composer in Windows 10/11

In this tutorial, you will learn how to remove or uninstall php composer in Windows 10/11 system and Linux. Composer is a powerful tool for managing dependencies in PHP projects. We’ll completely Uninstall or removed composer (php dependencies manager) from your Windows 10/11 environment.

Why Uninstall Composer?

Sometimes, We attempted to install Composer during our Laravel or PHP libraries installation process. However, We faced challenges during the installation, resulting in an unsuccessful setup. As a result, we are now looking to uninstall Composer.

There are the following reasons to uninstall Composer from the system:

  • No Longer Needed: You have completed your PHP projects and don’t require Composer or have switched to a different development environment.
  • System Cleanup: You want to remove unnecessary software to free up disk space.
  • Reinstallation: We encountered issues while installing Composer. Consequently, we now seek to uninstall Composer.

What’s Composer

Composer is an application-level package manager for PHP applications. It manages the dependencies and required libraries for PHP-based applications. You can install, remove and upgrade the package using the composer.

You can also read: How To install PHP Composer in Linux/Windows

Uninstall Composer From Windows 10/11

We’ll walk you through the steps to remove Composer from your Windows operating system.

Option 1: Uninstall Composer From Windows 10/11 Using GUI

To delete or uninstall Composer from a Windows 7/8/10 computer, simply follow the steps listed below.

Let’s start with a step-by-step guide to uninstalling/removing composer from Windows 10/11:

Step 1: Let’s Open a window search.
Step 2: Navigate to Programs uninstall


Step 3: Select the Composer and click uninstall button(upper top)


Step 4: The prompt box will appear with the question “Are you sure want to completely remove composer and all its components”, Click yes to process uninstall process.
Step 5: Wait to complete this uninstalling composer process from Windows, This will remove the composer from Windows 10/11. After successfully uninstalling composer from your Windows 10/11, You’ll get a success message:

Option 2: Uninstall Composer in Windows 10/11 Using Command Prompt

Step 1: Open the command or PowerShell

  • For Command Prompt: Press Windows Key + R, type cmd, and press Enter.
  • For PowerShell: Press Windows Key + X, and select “Windows Terminal (Admin)” or “Windows PowerShell (Admin)” from the menu.

Step 2: Check the composer version

composer --version

Step 3: Navigate to the Composer Directory, The default location is: C:\ProgramData\ComposerSetup\bin

Related Post

cd C:\ProgramData\ComposerSetup\bin

Step 4: Uninstall Composer

Run the following command to uninstall the composer package.

composer self-update –rollback

Step 5: Verify Uninstallation

You can verify that Composer has been removed by version check again as in Step 2.

Step 6: Restart Your System (Optional)

You can restart the system or open a new command window.

Uninstall Composer in Ubuntu

Let’s walk you through the steps to remove Composer from your Ubuntu installation.

Option 1: Uninstall Composer in Ubuntu Using Command Prompt

To remove just the composer package itself from Ubuntu 16.04 execute on the terminal:

sudo apt-get remove composer

sudo rm -r composer

Option 2: How To Remove Composer manually in Linux

In the steps that follow, you can also manually remove the composer:

Step 1: Search the path of the file composer.phar on your system. The command is whereis composer
Step 2: Delete the file composer.phar
Step 3: Delete the Cache Folder:
Linux: /home//.composer
Windows: C:\Users\\AppData\Roaming\Composer

Conclusion:

We have learned How to uninstall Composer from your Windows 10 or 11 system as well as on your Linux system. You can safely and effectively remove Composer from your computer by following this article.

Recent Posts

Configure and Retrieve S3 Information Using Laravel PHP-AWS-SDK

This tutorial helps integrate a PHP SDK with Laravel. We'll install aws-php-sdk into laravel application and access all aws services… Read More

4 months ago

What is the Purpose of php_eol in PHP?

in this quick PHP tutorial, We'll discuss php_eol with examples. PHP_EOL is a predefined constant in PHP and represents an… Read More

10 months ago

Laravel Table Relationship Methods With Example

This Laravel tutorial helps to understand table Relationships using Elequonte ORM. We'll explore laravel table Relationships usage and best practices… Read More

10 months ago

Exploring the Power of Laravel Eloquent Join?

We'll explore different join methods of Laravel eloquent with examples. The join helps to fetch the data from multiple database… Read More

10 months ago

Quick and Easy Installation of Laravel Valet

in this Laravel tutorial, We'll explore valet, which is a development environment for macOS minimalists. It's a lightweight Laravel development… Read More

11 months ago

What is Laravel Soft Delete and How Does it Work?

I'll go through how to use soft delete in Laravel 10 in this post. The soft deletes are a method… Read More

11 months ago

Categories