[[config-uninstall]]

=== Uninstalling Unused Modules

[role="summary"]
How to uninstall modules to reduce overhead.

(((Module,uninstalling unused)))
(((Uninstalling,unused modules)))
(((Performance,improving)))
(((Drush tool,using to uninstall module)))

==== Goal

Uninstall the core Search and History modules, as well as the core Activity
Tracker module if you installed it in <<config-install>>, to reduce overhead.

==== Prerequisite knowledge

<<understanding-modules>>

==== Site prerequisites

* You must have at least one unused module on your site that you want to
uninstall, such as the core Search module.

* If you want to use Drush to uninstall modules, Drush must be installed. See
<<install-tools>>.

==== Steps

You can use the administrative interface or Drush to uninstall modules.

===== Using the administrative interface

. In the _Manage_ administrative menu, navigate to _Extend_ > _Uninstall_
(_admin/modules/uninstall_) where you will find the list of modules that are
ready to be uninstalled.

. Check the boxes for the modules you are uninstalling (_Search_, _History_, and
_Activity Tracker_). Click _Uninstall_ at the bottom of the page.
+
--
// Top part of admin/modules/uninstall, with Activity Tracker checked.
image:images/config-uninstall_check-modules.png["Uninstalling module",width="100%"]

[NOTE]
=================
You cannot uninstall a module if it is required by some other module(s) and/or
functionality. For example, the core File module is required by the core Text
Editor, CKEditor, and Image modules. It can't be uninstalled unless you
uninstall its dependent module(s) and functionality first. A module that cannot
be uninstalled yet will have a disabled checkbox, restricting you from
uninstalling it.
=================
--

. Step 2 will prompt you to confirm the module uninstall request. Click
_Uninstall_.
+
--
// Uninstall confirmation screen, after checking Activity Tracker, History,
// and Search modules from admin/modules/uninstall.
image:images/config-uninstall_confirmUninstall.png["Confirm uninstall - search module",width="100%"]
--

===== Using Drush

. In the _Manage_ administrative menu, navigate to _Extend_
(_admin/modules_). The _Extend_ page appears showing all the available modules
in your site.

. Find the machine name of the module you want to uninstall, by expanding the
information area for the module. For instance, the core Activity Tracker
module's machine name is _tracker_.

. Run the following Drush command to uninstall the module:
+
----
drush pm-uninstall tracker
----

==== Expand your understanding

* <<install-tools>>

* <<prevent-cache-clear>>

* You can also uninstall the core Comment module by following these steps, but
only after comment fields have been removed, which is a side effect of
<<structure-content-type-delete>>.

//==== Related concepts

//==== Additional resources


*Attributions*

Written and edited by https://www.drupal.org/u/surendramohan[Surendra Mohan],
and https://www.drupal.org/u/jojyja[Jojy Alphonso] at
http://redcrackle.com[Red Crackle].
