diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c
index e4354638c73e065d662d2ca5ac86d51aacbc22bd..b5fb31c8bcfca1fa284faad0ea18c56913eece82 100644
--- a/src/xpdev/ini_file.c
+++ b/src/xpdev/ini_file.c
@@ -393,6 +393,20 @@ BOOL DLLCALL iniRemoveSection(str_list_t* list, const char* section)
 	return(TRUE);
 }
 
+BOOL DLLCALL iniRemoveSections(str_list_t* list, const char* prefix)
+{
+	str_list_t sections = iniGetSectionList(*list, prefix);
+	const char* section;
+
+	while((section = strListPop(&sections)) != NULL)
+		if(!iniRemoveSection(list, section))
+			return(FALSE);
+
+	strListFree(&sections);
+
+	return(TRUE);
+}
+
 BOOL DLLCALL iniRenameSection(str_list_t* list, const char* section, const char* newname)
 {
 	char	str[INI_MAX_LINE_LEN];
diff --git a/src/xpdev/ini_file.h b/src/xpdev/ini_file.h
index bfa0cdceee8c3a8cdf5a261f68c29d1df4dd4080..4bcd7162f182a8fb7d7d9e83f3637d59c5e9d154 100644
--- a/src/xpdev/ini_file.h
+++ b/src/xpdev/ini_file.h
@@ -245,6 +245,7 @@ DLLEXPORT char* DLLCALL		iniPopKey(str_list_t*, const char* section, const char*
 DLLEXPORT BOOL DLLCALL		iniRemoveKey(str_list_t*, const char* section, const char* key);
 DLLEXPORT BOOL DLLCALL		iniRemoveValue(str_list_t*, const char* section, const char* key);
 DLLEXPORT BOOL DLLCALL		iniRemoveSection(str_list_t*, const char* section);
+DLLEXPORT BOOL DLLCALL		iniRemoveSections(str_list_t*, const char* prefex);
 DLLEXPORT BOOL DLLCALL		iniRenameSection(str_list_t*, const char* section, const char* newname);
 
 /*