How to Clean Bundles

If you have been managing a Plex server for several years then you may have removed items from your library from time to time. For those items that have been deleted, Plex won't automatically remove the associated poster images and other metadata files from the server.

Cleaning the bundles from your Plex server is one of the steps in the Plex Dance to reset a library on your server. The next section explains the steps involved in cleaning bundles on your Plex server.

How to Clean Bundles in Plex

Table of contents

How to clean bundles
The step-by-step guide for running the clean bundles option from the Plex Web app.
Scheduling clean bundles in Plex
Step-by-step instructions for scheduling the clean bundles command to run on a schedule in Plex.
Running clean bundles on-demand
Discusses how you can run the clean bundles command at anytime without using the Plex Web app.

How to clean bundles

When Plex associates images and metadata files with your media items, these files are stored in "bundles" on your Plex server. When a media item is removed, the bundle associated with the item is not automatically removed.

Plex will clean bundles from your server as a weekly scheduled task. If you have removed many items, you may want to run the clean bundles option manually to free up space on your server.

Cleaning the bundles in Plex is usually quick and easy, depending on how many files need to be cleaned from the server. To clean the bundles in Plex, do the following:

  1. From Plex, click the More link.
    The More Option in Plex.
    The 'More' Option in Plex
  2. Move your mouse cursor over your server name from the menu on left. Click the three dots that appear, and then select Manage Server->Clean Bundles from the menu that appears.
    The Clean Bundles Option in Plex.
    The 'Clean Bundles' Option in Plex
  3. Click the Clean button.
    The Clean Bundles Dialog in Plex.
    The 'Clean Bundles' Dialog in Plex

Once the above steps are run, the amount of drive space used by Plex should be reduced. The amount of space that is freed up is dependent on how many old bundles were removed.

Scheduling clean bundles in Plex

Running the clean bundles option in Plex is a good way to free up space immediately after removing large media items, but you may want to remove old bundles on a regular basis. Plex allows you to schedule this task on a weekly basis.

To schedule the cleaning of old bundles, use the following steps:

  1. Open a Web browser and navigate to your Plex server.
  2. Log into your Plex server with an administrator account.
  3. Click the Settings icon - the wrench - in the upper-right corner of the Plex server page.
  4. On the left menu, click the Scheduled Tasks option under the Settings section.
  5. Check the Remove old bundles every week option.
  6. Click the Save Changes button at the bottom of the page to save your changes.
    Remove old bundles every week option in Plex.
    The 'Remove old bundles every week' option in Plex

The above steps will have Plex clean old bundles on a weekly basis to help optimize your Plex server.

Running clean bundles on-demand

When the clean bundles option is run, whether from the Plex Web app or the scheduler, Plex calls its API command to clean the bundles. You can also run the clean bundles API command anytime to clean up your Plex server whenever you wish.

The Plex scheduler outlined in the previous section will run the clean bundles command on a weekly basis. If you would like to clean up the bundles on a different schedule, then you can call the clean bundles API command from a third-party scheduler instead of using the built-in Plex scheduler.

While you shouldn't need to clean the bundles from your Plex server very often, it is a good option to use if you have done a purge of many media items from your server to help free up space.