import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Cookies {
    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.get(“https://www.google.co.in/”);
        System.out.println(“cookies before delete: “+driver.manage().getCookies());
        driver.manage().deleteAllCookies(); //
        System.out.println(“cookies after delete: “+driver.manage().getCookies());
    }
}

 

Source: http://selenium-makeiteasy.blogspot.com