Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I delete a package using NuGet?

I installed twitter bootstrap from NuGet, then I figured out I didn't need it anymore. Just for the sake of file size I want to delete this package files from my project folders.

How can I achieve this without deleting important files?

like image 330
Tassisto Avatar asked Jan 07 '14 10:01

Tassisto


2 Answers

Use Uninstall-Package command:

PM> Uninstall-Package Bootstrap [-ProjectName [Uninstall from this project]]

If ProjectName parameter is omitted, the default project is chosen. Use the -Force flag to uninstall the package, even if there are dependencies on it.

Hope this helps.

like image 144
volpav Avatar answered Oct 21 '22 10:10

volpav


Try the below

Uninstall-Package PackageName

From Nuget Page

The following package elements are removed:

  • References in the project. In Solution Explorer, you no longer see the library in the References folder or the bin folder. (You might have to build the project to see it removed from the bin folder.)

  • Files in the solution folder. The folder for the package you removed is deleted from the packages folder. If it is the only package you had installed, the packages folder is also deleted.)

  • Any changes that were made to your app.config or web.config file are undone.

like image 1
Murali Murugesan Avatar answered Oct 21 '22 10:10

Murali Murugesan