SPSolution.Retract method (DateTime, Collection<SPWebApplication>)

Creates a timer job to retract the specified solution from the specified web applications at a particular time.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public void Retract(
	DateTime dt,
	Collection<SPWebApplication> webApplications


Type: System.DateTime

A DateTime object containing the time to run the timer job.

Type: System.Collections.ObjectModel.Collection<SPWebApplication>

A collection of SPWebApplication objects from which to retract the solution.

When a solution is retracted, all files for that solution are retracted, even if another solution points to the same file. This can be avoided by ensuring that each solution points to a unique set of files.

If you are running multiple jobs and the order in which they run is important, make sure that the specified times are sufficient for each job to complete before the next job is submitted. When multiple jobs are in the pool, the order in which they run is unpredictable.

To retract a language package, see SPSolutionLanguagePack.