# Running update manager from command line

Note: The update manager command line application is deprecated. Use the p2 director application instead.

In addition to the install wizard and configuration dialog, it is possible to perform update manager operations by running eclipse in a command line mode. You can install, update, enable, disable features, or list installed features, or features available on an update site, or adding an extension product site to the local install, etc.
You can also, mirror chosen features from an update site to a local update site location.
Launch eclipse as follows, where [ ] means optional argument and arguments in italics must be provided by the user, and <version> means the specific version of the org.eclipse.equinox.launcher jar in your install.
Installing a feature from a remote site:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command install
-featureId feature_id
-version version
-from remote_site_url
[-to target_site_dir]

Example: `java -jar plugins/org.eclipse.equinox.launcher_1.0.0.v20070530.jar -application org.eclipse.update.core.standaloneUpdate -command install -from http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-update-home/optionalSite/ -featureId com.example.root -version 1.0.0`

Updating an existing feature or all features:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command update
[-featureId feature_id ]
[-version version ]
Enabling (configuring) a specified feature:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command enable
-featureId feature_id
-version version
[-to target_site_dir]
Disabling (unconfiguring) a specified feature:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command disable
-featureId feature_id
-version version
[-to target_site_dir]
Uninstalling a specified feature:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command uninstall
-featureId feature_id
-version version
[-to target_site_dir]
In all the above commands where the -to target_site_dir is specified, corresponding configured target site at given directory will be used. If it is not specified, then the default local product site is used.
If you only need to verify if the operation would succeed, in the above commands, (i.e. it satisfies the constraints), without actually performing it, then add -verifyOnly true to the list of arguments.
Searching a remote site, listing all available features for install:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command search
-from remote_site_url
Listing installed features:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command listFeatures
-from local_site_dir
The features are listed as:
`Site: site url
Feature: id version enabled (or disabled)`
Adding a local site with more features:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command addSite
-from local_site_dir
Removing a local site:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command removeSite
-to local_site_dir
Mirroring feature(s) from a remote site:
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command mirror
-from remote_site_url
-to target_site_dir
[-featureId feature_id]
[-version version]
[-mirrorURL mirror_site_url]
If -mirrorURL is specified, an update policy will be generated in <target_site_dir>/policy.xml file. The resulting policy.xml maps all features from the mirror site to the specified URL. The policy.xml can be used as is, or its fragments can be included into custom designed policy file.
The return code for each command is either 0 (success) or 1 (failure).
All the above commands should be able to be run using the eclipse executable instead of java -jar. On windows using the eclipsec executable provides better console support. Additionally, most options accepted by Eclipse executable can be passed. They are especially useful during debugging and for specifying target environment for installed features. For example, passing option `-data some_path` will set the workspace to some_path.