Logo Knowledge
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  1. Acquia Support Knowledge Base
  2. How-To
  3. Guides

Uninstalling a Profile

    See more
    • Created
    • May 15, 2018 13:09

    Drupal distributions offer a simple and elegant way to spin up a site based on features that match your project needs. Over time your project may diverge from the direction of a distribution or a distribution may no longer be supported. In these situations it may be necessary to  uninstall the distribution. The following steps  can be used to remove a distribution from a Drupal 7 site.

     

    Most distributions reside in the profiles directory of your site.  

    1. Move modules and themes that you will continue using to their standard location in the sites directory. You can skip the mkdir steps if these directories already exist:

    mkdir sites/all/libraries
    
    mv profiles/<distribution>/libraries/* sites/all/libraries
    
    
    
    mkdir sites/all/modules/contrib
    
    mkdir sites/all/modules/custom
    
    mv profiles/<distribution>/modules/<distribution>_* sites/all/modules/custom
    
    mv profiles/<distribution>/modules/* sites/all/modules/contrib
    
    
    
    mkdir sites/all/themes
    
    mv profiles/<distribution>/themes/* sites/all/themes

    2. Search for any paths that are explicitly set by the install file included with your profile:

    cd profiles/<distribution>
    
    grep 'profiles/<distribution>' * -R

    Your output may look similar to the following (placeholder text would be replaced by real values):

    <distribution>.install:  variable_set('<variable_name>', 'profiles/<distribution>/libraries/<library_name>');

    3. Using drush, set a new path for the variable listed. Repeat for each item returned by the previous step:

    Drush vset <variable_name> 'sites/all/libraries/<library_name>'

    4. Use drush to update the install profile variable:

    drush vset install_profile standard

    5. Some additional cleanup may also be required in the database:

    drush sqlq "DELETE FROM `system` WHERE filename LIKE 'profiles/<distribution>/<distribution>.profile"
    
    drush sqlq "UPDATE `system` SET status=1 WHERE filename LIKE 'profiles/standard/standard.profile'"

    6. Once you have moved the modules and and themes to their new locations, rebuild the registry and clear caches:

    drush @sites registry_rebuild
    
    drush @sites cc all

    You may need to install registry_rebuild on one of your environments. To do this  use the following command before completing the steps above:

    drush7 @none dl registry_rebuild

     

    Acquia Products

    • Remote Administration

    Topics

    • drupal7
    • drupal8
    • profile
    • distribution
    Avatar
    Mohammad Zomorodian
    • May 15, 2018 13:09
    • Facebook
    • Twitter
    • LinkedIn

    Was this article helpful?
    0 out of 0 found this helpful

    Return to top

    Related articles

    • Selecting Acquia Git repo for Acquia Pipelines
    • Upgrading from PHP 7.2 to 7.3
    • Fix for the warning about the Drupal 8.8.x deprecated temporary directory configuration
    • Acquia Cloud Site Factory: Duplicating vs. Installing
    • Upgrading from Drush 8 to Drush 9 when using BLT

    Support

    Acquia Support Knowledge Base
    • Submit a Request
    • Contact Support
    • Acquia Support Guide
    • Product Documentation
    • System Status

    About Acquia

    • About Us
    • Leadership
    • Board of directors
    • Newsroom
    • Careers
    • Customers
    • Contact Us
    53 State Street, 10th Floor
    Boston, MA 02109
    United States
    Phone: 888-922-7842
    Map: Google Maps
    View other locations
    • Feeds
    • Legal
    • Security Issue?

    Copyright © 2018 Acquia Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.