Home » Magento Guide » 10 Magento website design tips » How to uninstall a Magento theme

How to uninstall a Magento theme

How to uninstall a Magento theme.

Key takeaways:

  • Always back up your Magento files and database before uninstalling a theme.
  • Confirm the theme is not assigned to any store view before removing files or database records.
  • The right uninstall method depends on whether you installed the theme with Composer or added it manually.
  • After removing a theme, clear cache and test key storefront pages.

You can uninstall a Magento 2 theme in two ways:

  • By removing it from the Magento codebase and database manually
  • By using the Magento theme uninstall command

The method you can use depends on multiple factors, such as:

  • How the Magento 2 application was installed, using Composer or cloning GitHub
  • How the theme was installed, using Composer or by uploading theme files

If you installed the theme by uploading the files, you need to uninstall it manually regardless of how you installed Magento. But, if you installed it using Composer, then the removal method varies based on the Magento installation process.

Host Magento at full throttle.

Get secure, reliable Magento hosting so you can scale faster.

Before you uninstall a Magento theme

Uninstalling a Magento theme takes more than deleting a folder. Before you remove anything, confirm the theme isn’t active, check whether other themes depend on it, and back up your files and database.

Start by confirming how the theme was installed. A Composer-installed theme should use Composer-aware uninstall steps. A manually uploaded theme usually requires manual file removal and database cleanup.

Back up your files and database

Create a full backup of your Magento files and database before removing a theme. Theme files, database records, static content, and cache can all affect how the storefront loads.

Adobe deprecated Magento’s inbuilt backup functionality in Magento 2.3.0 and later versions. Although you can still use it from the command-line interface (CLI), they no longer recommend using it.

Consult your hosting provider for options to back up your Magento store and explore an alternative binary backup tool such as Percona XtraBackup to backup the database.

If you have a staging environment, test the theme removal there first. This gives you a safer place to confirm the new active theme, check storefront pages, and catch missing files before shoppers see problems.

Check whether the theme is active

Don’t uninstall a Magento theme while a store view still uses it.

Change the active theme in Magento Admin

Go to Content > Design > Configuration in the Magento admin. Ensure the theme you wish to uninstall isn’t assigned to a store view. If it is, follow Adobe’s guide demonstrating how to change a theme in Magento 2 and assign an alternate theme.

Check every store view, especially if you run a multi-store Magento setup. One storefront may use a different theme than another, so confirm the theme isn’t assigned anywhere before removing files.

Check parent and child theme relationships

Go to Content > Design > Themes in the Magento admin panel. Check the Parent Theme column to verify your custom theme isn’t listed there. If it is, uninstall the child theme first and then the parent theme.

This step matters because a child theme can depend on a parent theme for layouts, templates, styling, or assets. Removing the parent theme first can break the child theme.

Find out how the theme was installed

The uninstall method depends on the install method. Before you run commands or delete folders, confirm whether the theme came from Composer, a manual upload, or a larger extension package.

Install typeWhere to checkBest uninstall method
Composer-installed themecomposer.json, Composer package list, Magento Marketplace install recordsMagento theme:uninstall command
Manually uploaded themeapp/design/frontend/<VendorName>/<ThemeName>Manual file removal and database cleanup
Theme bundled with an extensionTheme developer documentation, module list, Composer packagesFollow vendor instructions first

Some themes include related modules or custom checkout changes. Review the theme developer’s documentation before removing files so you don’t leave behind extensions, layouts, or configuration that still reference the old theme.

Method 1: Uninstall a Composer-based Magento theme

The steps to uninstall a Magento 2 theme using Composer vary slightly based on the Magento 2 installation method. If you installed Magento using Composer, you can uninstall the theme using a CLI command.

However, if you installed Magento by cloning its Git repo, you’ll need to remove the theme from Magento’s composer.json file before using the command.

Remove the theme from composer.json for GitHub installs

Note: This step is only required if you’ve installed Magento by cloning its Git repository.

Log in to the Magento file system and go to the Magento root directory.

Edit the Magento composer.json file using your preferred text editor and delete the line referencing the theme package.

After removing the package reference from the require section, update dependencies:

Now, you can safely run the Magento theme uninstall command as described in the next step.

Run the Magento theme uninstall command

From the Magento root directory, run:

Replace frontend/Vendor/Themename with the actual theme path.

This command:

  • Checks if the theme exists at the defined theme path
  • Verifies the theme is a Composer package
  • Checks for dependencies, verifies the absence of a virtual theme, and that the theme isn’t currently in use

If all checks are successful, it will:

  • Put the store in maintenance mode and back up the codebase if the –backup-code command is used
  • Remove the theme from the Magento database tables first and then from the codebase with composer remove
  • Clear cache files and generated classes. If –clear-static-content is specified, it will also clear static view files
  • Disable maintenance mode once the process is complete

If dependencies exist, resolve the dependency issue before rerunning the command. If the theme relies on another theme, you may need to remove both themes together.

Method 2: Manually remove a Magento theme

Use manual removal when you installed the theme by uploading files to the Magento filesystem.

If you’re using a custom Magento theme, you may have installed it manually by placing the theme files in a directory in the app/design folder in the Magento root.

Enable maintenance mode

Put your store in maintenance mode to disable bootstrapping when you uninstall the Magento 2 theme.

Log in to your Magento 2 server as the Magento file system owner and run the following command to enable maintenance mode:

Remove the theme directory

Manually installed Magento themes are usually placed in the app/design directory in the Magento root. Find the path to where the theme files are placed in the Magento root and delete the theme folder.

The path usually looks like this:

Remove only the theme folder you confirmed is not active and not required by a child theme.

Example:

Remove the theme record from the database

Next, to remove the Magento 2 theme, delete all records and references to the theme inside the store database.

Use the exact theme path and confirm any table prefix before running SQL. For a standard database table with no prefix, the query looks like this:

Direct database changes can affect your store. Back up the database first, confirm the theme path, and avoid deleting records you haven’t verified.

Clear cache and disable maintenance mode

To complete the uninstallation process, clear all Magento caches using the following command:

If static content still references the removed theme, you may also need to clear generated or static view files and redeploy static content:

Run static content deployment carefully on production stores. Use a planned maintenance window when possible.

Finally, disable maintenance mode using:

If you notice any errors on the frontend, clear the cache of other caching applications such as Varnish or Redis.

Reindex and test the storefront

After uninstalling a Magento theme, test more than the homepage. Theme files can affect category pages, product pages, cart, checkout, customer login, search, navigation, CSS, JavaScript, images, and fonts.

Check these areas before you consider the work complete:

  • Homepage
  • Category pages
  • Product pages
  • Search
  • Cart
  • Checkout
  • Customer login
  • Magento Admin design settings
  • CSS, JavaScript, images, and fonts

If you see layout issues or missing styling, clear cache again, check static content, and confirm the store view uses the correct replacement theme.

When to ask for support

Ask for help if the theme is active on a live store, supports checkout customizations, has parent or child dependencies, came bundled with extensions, or requires direct database changes.

Support can help review backups, theme assignments, file paths, database records, cache, static content, and logs before changes affect shoppers.

Magento themes FAQs

Check composer.json, installed Composer packages, or Magento Marketplace install records. If the theme came from Composer, use Composer-aware uninstall steps when possible.

Manually installed frontend themes usually live in app/design/frontend/<VendorName>/<ThemeName>.

For manually removed themes, you may need to remove the matching record from the theme table after backing up the database and confirming the exact theme path.

Yes. Problems can happen if the theme is still active, has child theme dependencies, includes related extensions, or supports checkout customizations.

Uninstall a Magento theme next steps

Uninstalling a Magento theme safely starts with a backup, a replacement active theme, the right uninstall method, database cleanup when needed, cache clearing, and post-removal testing.

Before deleting anything, confirm whether the theme is active and whether you installed it manually or with Composer. That one check will guide the safest removal path.

If theme removal affects a live store or requires server-side support, explore Liquid Web Magento hosting.

View Managed Magento Plans

Ready to get started?

Get the fastest, most secure Magento hosting on the market

Additional resources

Magento admin training: top 5 online resources →

Get Magento admin training to manage your store with confidence.

How to install Magento extensions →

Install Magento extensions to add new features and expand your store’s functionality.

Magento 2 product types: a beginner’s guide →

Manage Magento products efficiently to keep your store optimized.