# How to install all my codrova plugins listed in package.json

**URL:** <https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328>\
**Category:** uncategorized\
**Created:** [April 20, 2015, 1:55pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328 "2015-04-20T13:55:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bichael](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@Bichael](https://forum.ionicframework.com/u/Bichael)\
**Post date:** [April 20, 2015, 1:55pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/1 "2015-04-20T13:55:35Z")

</div>

Hi, I have two questions regarding my “package.json” file:

1. When I start a default project it has included the following plugins:

Is there any command I can run to install them again except running `cordova plugin add` 3 times?

1. If I want to add a new plugin, e.g. com.google.cordova.admob, is there a way to automatically add it in my “package.json”?  
Something like: `cordova plugin add xxx --save` (like with bower)

---

<div class="post-metadata">

**Author:** ![tobika](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/tobika/32/75772_2.png) [@tobika](https://forum.ionicframework.com/u/tobika)\
**Post date:** [April 20, 2015, 3:24pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/2 "2015-04-20T15:24:46Z")

</div>

I’d say Raymond Camdon explains this very well in a blog post he just posted minutes ago 😉  
It responds exactly to your question.

```
ionic state reset

```

Something like this should work.

> **[Ionic adds a new State feature](https://www.raymondcamden.com/2015/04/20/ionic-adds-a-new-state-feature?utm_content=buffer20073&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer)**
>
> To be fair, this may not be very new, I've been working with an alpha version of the Ionic CLI while I test push (and other stuff ;) so my version has been a bit out of sync. Today I switched from the alpha to the release version and discovered a...

---

<div class="post-metadata">

**Author:** ![FreddyLem](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@FreddyLem](https://forum.ionicframework.com/u/FreddyLem)\
**Post date:** [May 1, 2016, 3:24pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/3 "2016-05-01T15:24:36Z")

</div>

this worked nicely for me.

here is a good link with some useful state commands:

> **[Install Or Reinstall All Cordova Plugins In Package.json With Ionic](https://solidfoundationwebdev.com/blog/posts/install-or-reinstall-all-cordova-plugins-in-package-json-with-ionic)**
>
> When intsalling the dependencies of an existing app your need to install all of the cordova plugins listed in package.json. Or you may just want to ens...

---

<div class="post-metadata">

**Author:** ![love8879201](https://avatars.discourse-cdn.com/v4/letter/l/2bfe46/32.png) [@love8879201](https://forum.ionicframework.com/u/love8879201)\
**Post date:** [June 2, 2016, 5:49am UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/4 "2016-06-02T05:49:59Z")

</div>

there is cordova compare

try it

[http://cordova.apache.org/docs/en/latest/platform\_plugin\_versioning\_ref/index.html](http://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/index.html)

---

<div class="post-metadata">

**Author:** ![onyrio](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@onyrio](https://forum.ionicframework.com/u/onyrio)\
**Post date:** [October 14, 2016, 9:44am UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/5 "2016-10-14T09:44:13Z")

</div>

Hi guys,  
I have developped a small plugin to download and install all plugins listed in plugins/fetch.json (this file contains also the variables used when you install some plugins that’s why I chosed it).  
You can check it here : [https://github.com/vlafranca/cordova-fetch-plugins](https://github.com/vlafranca/cordova-fetch-plugins)

---

<div class="post-metadata">

**Author:** ![radoo](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@radoo](https://forum.ionicframework.com/u/radoo)\
**Post date:** [October 14, 2016, 6:42pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/6 "2016-10-14T18:42:27Z")

</div>

actually, it’s:  
`# ionic state restore`  
not reset.

---

<div class="post-metadata">

**Author:** ![fantasrulai](https://avatars.discourse-cdn.com/v4/letter/f/ccd318/32.png) [@fantasrulai](https://forum.ionicframework.com/u/fantasrulai)\
**Post date:** [November 2, 2017, 9:36am UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/8 "2017-11-02T09:36:52Z")

</div>

```auto
# ionic state
it has been removed as of CLI 3.0.

```

This command is working:

```auto
# ionic cordova prepare

```

Cordova will install platforms and plugins listed in config.xml

---

<div class="post-metadata">

**Author:** ![lance77](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@lance77](https://forum.ionicframework.com/u/lance77)\
**Post date:** [January 26, 2018, 2:24am UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/9 "2018-01-26T02:24:04Z")

</div>

ionic cordova prepare

---

<div class="post-metadata">

**Author:** ![vivekanandans](https://avatars.discourse-cdn.com/v4/letter/v/d9b06d/32.png) [@vivekanandans](https://forum.ionicframework.com/u/vivekanandans)\
**Post date:** [May 21, 2018, 4:49pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/10 "2018-05-21T16:49:27Z")

</div>

**ionic state reset** has been removed as of CLI 3.0.

User _ **ionic cordova prepare** _ to install all plugins listed in package.json

---

<div class="post-metadata">

**Author:** ![sebastianlara](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sebastianlara](https://forum.ionicframework.com/u/sebastianlara)\
**Post date:** [August 2, 2018, 1:44pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/11 "2018-08-02T13:44:38Z")

</div>

`ionic cordova prepare`

install platforms and plugins listed in config.xml

Run `npm install` before

**my ionic version 3.20.0**  
**my cordova version 8.0.0**

---

<div class="post-metadata">

**Author:** ![pullatjunaid](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pullatjunaid/32/116063_2.png) [@pullatjunaid](https://forum.ionicframework.com/u/pullatjunaid)\
**Post date:** [April 5, 2019, 1:16pm UTC](https://forum.ionicframework.com/t/how-to-install-all-my-codrova-plugins-listed-in-package-json/21328/12 "2019-04-05T13:16:16Z")

</div>

Nice, `ionic cordova prepare` working good.
