# Shopware Services in uninstall Methode vom Plugin nutzen

**URL:** <https://forum.shopware.com/t/shopware-services-in-uninstall-methode-vom-plugin-nutzen/86549>\
**Category:** Programmierung\
**Tags:** programming\
**Created:** [29. März 2021 um 10:49 UTC](https://forum.shopware.com/t/shopware-services-in-uninstall-methode-vom-plugin-nutzen/86549 "2021-03-29T10:49:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@nick](https://forum.shopware.com/u/nick)\
**Post date:** [29. März 2021 um 10:49 UTC](https://forum.shopware.com/t/shopware-services-in-uninstall-methode-vom-plugin-nutzen/86549/1 "2021-03-29T10:49:36Z")

</div>

Hi,

ich habe ein sehr ähnliches Problem wie hier: [In uninstall Methode Service aus Plugin verwenden - #10 von Michael\_Telgmann](https://forum.shopware.com/t/in-uninstall-methode-service-aus-plugin-verwenden/64086/10)

Ich möchte in der uninstall-Methode ein bisschen aufräumen und brauche dafür Shopware Services.  
Ich habe es genauso probiert, wie hier beschreiben: [Shopware 6: Using setter injection in plugins](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/plugin-setter-injection)

Jedoch werden die Services nur injected, wenn das Plugin vorher aktiv war. Also:  
Plugin ist installiert und aktiviert: in uninstall() werden alle serves richtig in injected  
Plugin ist deaktiviert aber installiert, keine Injection in uninstall()

Das gleiche passiert auch andersrum. In install() sind alle Services null in activate geht es dann…

Ich wäre für Hilfe sehr dankbar, wie ich zuverlässig an die Services in uninstall() komme.

LG Nick

---

<div class="post-metadata">

**Author:** ![nick](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@nick](https://forum.shopware.com/u/nick)\
**Post date:** [1. April 2021 um 08:11 UTC](https://forum.shopware.com/t/shopware-services-in-uninstall-methode-vom-plugin-nutzen/86549/3 "2021-04-01T08:11:15Z")

</div>

Hi @Shopwarian

das hat super geklappt, vielen vielen Dank.

Case closed!

Schöne Ostern,  
Nick
