private static void deletePreviousProject(String projectDirectoryPath, String projectName) {
		ProjectLocator url = new ProjectLocator(projectDirectoryPath, projectName);
		File projectDir = url.getProjectDir();
		if (!projectDir.exists()) {
			return;
		}

		// something didn't cleanup correctly; we need to try to cleanup
		if (!ProjectTestUtils.deleteProject(projectDirectoryPath, projectName)) {
			throw new IllegalStateException("Unable to delete test project");
		}
	}
Executes the give command on the program.

@param cmd
           the command to be applied to the program.
@param program
           the program on which the command is to be applied.
Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java