How to manually remove / delete a portlet


  • How can I completely delete a portlet so that I can redeploy an older version?
  • When I uninstall a portlet from the App Manager, it's only Blacklisted and not uninstalled.
  • How do I remove a custom module in Liferay?


  • DXP 7.0 DXP 7.1 DXP 7.2


  • To completely uninstall a portlet, simply remove its .jar from the file system e.g., remove the file from ${liferay.home}/osgi/modules

  • Wider explanation by example:

    A.) When a module is deployed, in this case by placing it into the ${liferay.home}/deploy folder, we can see the STARTED message in the log

    INFO [][AutoDeployDir:271] Processing my-example-portlet.jar
    ................ STARTED my-example-portlet.jar

    B.) We can also view the deployment in the UI under Control Panel > Apps > App Manager


    C.) Clicking the 3-ellipses gives us the options to Deactivate or Uninstall

    Selecting Uninstall we are then prompted to confirm by Pressing OK

    In the logging we see that the portlet has now been Blacklisted and STOPPED:

    INFO [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration)][BundleBlacklist:188] Stopping blacklisted bundle my-example-portlet.jar

    INFO [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration)][BundleStartStopLogger:49] STOPPED my-example-portlet.jar

    D.) If we navigate to Control Panel > Configuration > System Settings > Module Container > Bundle Blacklist - we find the portlet blacklist entry:


    If we delete the my-example-portlet entry from Blacklist Bundle Symbolic Names and press Update, this will reinstall and start up the portlet again. 

    INFO [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration)][BundleBlacklist:120] Reinstalling bundle my-example-portlet.jar

    INFO [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration)][BundleStartStopLogger:46] STARTED my-example-portlet.jar

    This happens as my-example-portlet.jar still exists under ${liferay.home}/osgi/modules


    Moreover, even if we delete the contents of ${liferay.home}/osgi/state , the portlet remains STOPPED while still present in the above location.

    Remove the .jar file from ${liferay.home}/osgi/modules to uninstall a portlet.