WSP files stuck in "Deploying" or "Retracting" status often arises when the SharePoint Timer Service or SharePoint Admin service is inactive on one or more servers in a SharePoint farm environment. This is particularly common in multi-server farms where service consistency across all servers might not be guaranteed.
To address this issue, please follow the steps bellow:
1. In SharePoint Central Administration, cancel the Deployment/Retraction for the solutions.



2. Check if your SharePoint Admin service and SharePoint timer service are running on each of web front end servers.
3. Restart the SharePoint timer service on each web front end server
4. After verifying services and restarting the timer service (on WFEs), attempt to redeploy or retract the WSP file again.
If the problem continues, you can perform the deployment or retraction manually using PowerShell with the following commands:
- To deploy the solution, use the "Install-SPSolution" command with the "Local" and "Force" parameters. You will need to execute this command for each solution on every web front-end server.
-Install-SPSolution -Identity solution_name.wsp -GACDeployment -local -force
Additional information on how to use this PowerShell command can be found in the link below: Install-SPSolution
- To retract the solution, use the "Uninstall-SPSolution" command with the "Local" and "Force" parameters. You will need to execute this command for each solution on every web front-end server.
Uninstall-SPSolution -Identity contoso_solution.wsp -local -force
Additional information on how to use this PowerShell command can be found in the link below: Uninstall-SPSolution
After manually deploying or retracting the solutions using PowerShell, you can remove them from the Central Administration.
However, if the issue persists, it could be related to a problem with your SharePoint farm, rather than the solutions themselves. Here are some additional resources online that you may find helpful in addressing issues related to deploying or retracting solutions in SharePoint:
SHAREPOINT SOLUTIONS - STUCK ON RETRACTING OR DEPLOYING