> For the complete documentation index, see [llms.txt](https://docs.foodcore.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.foodcore.io/troubleshooting/import-duplicates.md).

# My import created duplicates

You've imported a CSV of ingredients and now you've got two versions of the same thing — "Plain Flour" and "plain flour", or "Caster Sugar" alongside "caster sugar (fine)". Both are in your ingredient list, pointing to different costs or allergen data, and some recipes are using one while some use the other.

This is a common post-import situation. Here's how to clean it up.

***

## Why this happens

When you import a CSV, FoodCore checks for exact name matches. If the imported name is even slightly different from what's already in your system — different capitalisation, a bracketed qualifier, a trailing space, an abbreviated unit — the importer treats it as a new ingredient and creates a second entry.

This means:

* "Whole Milk" in your system + "whole milk" in the CSV → two ingredients
* "Butter" in your system + "Butter (Unsalted)" in the CSV → two ingredients
* "Plain Flour (Allinson's)" in your system + "Plain Flour" in the CSV → two ingredients

The import preview should have flagged potential conflicts and offered you a skip or merge option. If you imported anyway, or if the name differences were too subtle to catch, you may now have duplicates to resolve.

***

## How to find the duplicates

1. Go to **Ingredients**
2. **Sort by Name** — this brings near-identical names next to each other in the list
3. Scroll through looking for pairs or groups of similar names
4. Pay particular attention to:
   * Ingredients with a cost of £0.00 (these are often newly imported placeholders)
   * Ingredients with no allergens set (another sign of an incomplete import entry)
   * Two versions of the same name with different capitalisation or punctuation

Make a note of each duplicate pair before you start merging — it's easier to work through a list than to keep scrolling back and forth.

***

## How to merge duplicates

For each duplicate pair:

1. **Select both ingredients** using the checkboxes in the ingredient list
2. Click **Merge** — FoodCore shows you both records side by side
3. **Choose the correct values** for each field:
   * **Name** — pick the version you want to use consistently going forward
   * **Cost and pack size** — pick whichever has the accurate, up-to-date purchasing data. If one is £0.00, that's your placeholder — use the real cost from the other
   * **Allergens** — pick the correctly set allergen status. If one has allergens set and the other doesn't, always take the set version (and verify it's accurate against your supplier's spec sheet)
   * **Unit** — ensure it matches how the ingredient is used in your recipes
4. **Confirm the merge** — all recipes that referenced the duplicate are updated automatically to use the merged ingredient

***

## After merging — spot-check your recipes

After each merge:

1. Open a recipe that was using the duplicate ingredient
2. Confirm the ingredient now shows the correct name, cost, and allergen status
3. Click **Recompute** to refresh the recipe's cost and allergen calculations

If the recipe cost changes noticeably after recomputing, the duplicate had different purchasing data from the original. Check the merged ingredient once more to make sure the cost is correct.

***

## How to avoid duplicates next time

**Review the import preview carefully.** Before confirming any CSV import, FoodCore shows you a preview of what will be created or updated. Look for any items flagged as potential conflicts and use the skip or merge option rather than importing a duplicate.

**Standardise your CSV before importing.** Before you upload, open the CSV and check that ingredient names match exactly what's already in FoodCore — same capitalisation, same spelling, same format. A few minutes of preparation saves a lot of cleanup.

**Use autocomplete when adding ingredients to recipes.** If the ingredient already exists, selecting it from the dropdown avoids any risk of creating a second version with a slightly different name.

***

## What's next

* [Find and merge duplicate ingredients](https://docs.foodcore.io/ingredients/duplicates.md)
* [Import ingredients from a CSV](https://docs.foodcore.io/ingredients/import.md)
* [Clean up duplicate ingredients](https://docs.foodcore.io/maintenance-and-best-practices/clean-duplicates.md)
