Uninstalling and deleting themes in SharePoint 2013 (Farm)

Note: This process is valid for Farm Solution Only

This article explains all necessary steps for uninstalling and deleting themes in SharePoint 2013 Farm installations.

Uninstalling the theme

  1. Start by reseting the master page to a SharePoint default master:
    • On the SharePoint ribbon click Settings
    • Click Site Settings
    • Select Master page
    • In the first two options select the "Seattle" master from the drop-downs
    • Make sure to check "Reset all sub sites"
  2. Now you must deactivate the theme package:
    • On the SharePoint ribbon click Settings
    • Click Site Settings
    • Under Site Actions select Manage site features
    • Locate "THEMENAME Theme Package" and click Deactivate
  3. And finally remove the theme package:
    • Run the SharePoint Management Shell as Admin, in your server
    • Go to the path where the theme .ps1 script is located
    • Run .\Install. ThemeNamePackage.ps1
    • If prompted, accept the "Execution Policy Change"
    • Select option 2 and wait a few seconds. SharePoint will retract the solution. During this process, if you try to access the site it will return a 503 error
    • Run .\Install. ThemeNamePackage.ps1
    • Select option 3 to completely remove the package from the solution store

Deleting the theme

  1. Start by validating the uninstallation process was successful:
    • Click Settings > Site Settings > Manage site features and confirm the theme feature is deactivated
    • Click Settings > Site Settings > MasterPage and confirm the Seattle masterpage is applied
  2. Retract and delete the solution:
    • On the server, open Central Administration
    • Go to the solution gallery /_admin/Solutions.aspx
    • Check if file THEMENAME.SP2013.wsp is in this gallery
    • If it is, click the solution, and retract it
    • When the retract job is finished click in the solution name again and delete it
  3. Manually delete remaining files:
    • On your server go to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\IMAGES
    • Delete folder THEMENAMEPackage
    • Go to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\JS
    • Delete folder THEMENAMEPackage
    • Go to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES
    • Delete folder THEMENAMEPackage
Success: The theme is completely removed.
Have more questions? Submit a request

Comments

  • Avatar
    Mbollhoefer

    Make sure you set the execution policy back to restricted when your done otherwise you could leave your environment

    set executionpolicy restricted

  • Avatar
    Mbollhoefer

    Also, if your installing a new theme make sure you run iisreset /noforce after uninstalling the two solutions or before trying to use the new one for force JIT (just in time) compilation which forces the .dll's to be unloaded or the newest ones loaded into RAM. Otherwise you will be wondering why your old version is still showing up even though the newest solution has been deployed.

Got a question?

If you can't find the answer to your question, you can contact us.
We are here and happy to help.

Powered by Zendesk