> For the complete documentation index, see [llms.txt](https://docs.momocode.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.momocode.de/en/shopware-6/media-cleanup-dashboard/2.-installation.md).

# 2. Installation

## Install the Plugin

1. Download the plugin from the Shopware Store or as a ZIP file.
2. In the Shopware Administration, navigate to **Extensions → My Extensions**.
3. Click **Upload extension** (for ZIP installation) or find the plugin in the list.
4. Click **Install** and then **Activate**.
5. No database migration is required — the plugin does not create any custom tables.

## Getting Started

1. Navigate to **Content → Media Cleanup** in the Administration.
2. Click **Start scan** to begin the analysis. The scan runs in the background — you can wait for the results or leave the page and return later.
3. Once the scan is complete, the list of unused media files appears. Results remain valid for 4 hours — page navigation and delete operations do not trigger a full re-scan.
4. Use the filters (file type, minimum size, age) to narrow down the results.
5. Select individual files via checkbox or click **Select all**.
6. Click **Delete selected** — a confirmation dialog appears showing the count and total size.
7. Confirm the deletion. The result (deleted / skipped / failed) will be displayed.
8. To refresh results, click **Rescan**.

## Setting Up User Permissions

The plugin adds two ACL privileges. To grant access to staff members:

1. Navigate to **Settings → System → Users & Permissions → Roles**.
2. Select the desired role (or create a new one).
3. Find **Media Cleanup** in the permissions section.
4. Assign the required privilege(s):
   * **Read** — access to the dashboard and the unused media list
   * **Delete** — permission to delete unused media files
5. Save the role.

## Notes

* Compatible with Shopware 6.6.x and 6.7.x (PHP 8.2+). Version 2.x supports Shopware 6.7, version 1.x supports Shopware 6.6.
* The plugin communicates only with your own Shopware instance — no external services.
* The async background scan (from version 1.1 / 2.1) requires a running Symfony Messenger worker. Without an active worker, the scan runs synchronously in the HTTP request — timeout protection for very large media libraries is not active in that case.
* Deleted files cannot be recovered. Please review your selection carefully before confirming.
* For very large media libraries, consider using the filters to process deletions in smaller batches.
* **Detection is based on Shopware's native logic:** The plugin uses Shopware's built-in unused media detection — the same logic that powers the `media:delete-unused` CLI command. The plugin is not responsible if Shopware classifies a file as unused that is still in use. Always review your selection carefully before deleting.

## Support

If you have questions or issues, please use the Shopware support tool or contact us at <moritz@momocode.de>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.momocode.de/en/shopware-6/media-cleanup-dashboard/2.-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
