src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts/UserDataProfileManagementService/removeProfile
class UserDataProfileManagementService:	async removeProfile(profile: IUserDataProfile): Promise<void> {
		if (!this.userDataProfilesService.profiles.some(p => p.id === profile.id)) {
			throw new Error(`Profile ${profile.name} does not exist`);
		}
		if (profile.isDefault) {
			throw new Error(localize('cannotDeleteDefaultProfile', "Cannot delete the default profile"));
		}
		if (profile.id === this.userDataProfileService.currentProfile.id) {
			throw new Error(localize('cannotDeleteCurrentProfile', "Cannot delete the current profile"));
		}
		const defaultExtensionsResourceToDelete = this.userDataProfilesService.profiles.length === 2 ? this.userDataProfilesService.defaultProfile.extensionsResource : undefined;
		await this.userDataProfilesService.removeProfile(profile);
		if (defaultExtensionsResourceToDelete) {
			try { await this.fileService.del(defaultExtensionsResourceToDelete); } catch (error) { /* ignore */ }
		}
	}