0

We have a sharepoint ennterprise server 2013. and i want to remove a farm solution. so i did these steps:-

1- i went to all the site collections >> Disable the feature.

2- i run this command:-

PS C:\Windows\system32> Uninstall-SPSolution -Identity  splistfilter.wsp  -WebApplication "http://***/"

Confirm
Are you sure you want to perform this action?
Performing operation "Uninstall-SPSolution" on Target "splistfilter.wsp".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y

but for more than 2 hours the farm solution is showing that it is retracing...

to see the pending job, i run this command:-

PS C:\Windows\system32> stsadm -o enumdeployments

<Deployments Count="1">
   <Deployment JobId="0eb2df7a-7b71-4014-9083-4dc0fc1f315b">
      <Title>Microsoft SharePoint Foundation Solution Retraction for "splistfilt
er.wsp"</Title>
      <Type>Retraction</Type>
      <State>Pending</State>
      <Schedule>2/13/2019 8:10 PM</Schedule>
      <File>splistfilter.wsp</File>
      <ServerType>Front-end Web server</ServerType>
      <Target>http://***/</Target>
   </Deployment>
</Deployments>

then i run these commands, but all of them raised errors:-

PS C:\Windows\system32> stsadm -o execadmsvcjobs

The administration service is running so all administration jobs will be run in
the timer service.

PS C:\Windows\system32> Remove-SPSolution -Identity splistfilter.wsp
Remove-SPSolution : The solution "splistfilter.wsp" has been deployed in the
farm. Please retract the deployment before removing the solution.You can also
use the -override parameter to forcibly remove the solution, but you will not
be able to retract the solution deployment.
At line:1 char:1
+ Remove-SPSolution -Identity splistfilter.wsp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...tRemoveSolution:
   SPCmdletRemoveSolution) [Remove-SPSolution], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRemoveSo
   lution

PS C:\Windows\system32> Remove-SPSolution -Identity splistfilter.wsp -force

Confirm
Are you sure you want to perform this action?
Performing operation "Remove-SPSolution" on Target "splistfilter.wsp".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y
Remove-SPSolution : The solution cannot be removed when a job is scheduled or
running.
At line:1 char:1
+ Remove-SPSolution -Identity splistfilter.wsp -force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...tRemoveSolution:
   SPCmdletRemoveSolution) [Remove-SPSolution], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRemoveSo
   lution

i restarted the SharePoint timer service + doing IIS reset but the farm solution is still showing Retracing (scheduled at...).

0

Go to Central Administration > System settings > Farm Solutions open your Solution here: enter image description here

Click Retract Solution solution from all web applications (it will create a job and take some time):

enter image description here

after successfully retraction process you are able to delete it (It must be in state Not Deployed): enter image description here

  • @Zdenek Vinduska the farm solution is deployed to the web application and not globally.. also if i try to run the uninstall command without mentioning the web application as follow Uninstall-SPSolution -Identity splistfilter.wsp i will get this error Uninstall-SPSolution : This solution contains resources scoped for a Web application and must be retracted from one or more Web applications. – SharePoint TestDev Feb 14 at 11:59
  • Go to Farm Solutions in Central Administration and do here a RETRACT as I said, I just used bad word "Remove it from all web applications" you shoud "retract it from all web applications" – Zdeněk Vinduška Feb 14 at 13:36
  • sorry i did not get what do you mean exactly ? – SharePoint TestDev Feb 14 at 14:20
  • Edited post... so i hope you will get it now, dont forget mark is as answer. – Zdeněk Vinduška Feb 14 at 14:45
  • but if i do this from central admin,, i will get the same results. where i will get it stuck on "retracting..." actually i tried the powershell way because doing this from the UI did not work for me at the first place.. – SharePoint TestDev Feb 14 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.