Category slug is getting numbers appended to it I have a category Australia and have been experimenting with boboldehampsink import plugin.

After deleting categories and starting over the category Australia now has a slug called 'australia-6'. I just want 'australia' but i cant get rid of the  hypen and 6.

I notice the content table has lots of entries for australia but no slugs so I'm wondering about the db schema for craftcms and how come i have got a stuck slug so quickly?
When you save an entry/category that is supposed to have its own URL, Craft will assign it a unique URI, based on the section/category group’s URL Format setting.

For example, let’s say you have a section called News, and its “Entries in this section have their own URLs” checkbox is checked, and it has this URL Format:

news/{slug}


When you save a News entry, Craft will assign it a unique URI based on that URL Format. If the entry’s slug is “foo”, then the first URI Craft will try to assign it will be “news/foo”.

However, if that URI is already taken by another entry/category (or some third party element type), Craft will increment the slug and try again:


news/foo-1
news/foo-2
news/foo-3
etc.


(If incrementing the slug has no effect on the URI – because the URL Format doesn’t actually contain a {slug} token – then Craft will simply give up and add a validation error to the element.)

Once it has found a URI that is actually unique, it will update the element’s Slug with the incremented version.

So in your case, when you save a category with the slug “australia” and it becomes “australia-6“, that means that you have 6 other elements that had been saved with the slug “australia” before it, with the same URL Format that your current category has, and so “australia-6” was just the first slug Craft could find that resulted in your category having a unique URI.

To find out which elements your category’s URI is conflicting with, you can go to Entries > All Entries, and search for slug:australia, and click through each of your category groups in the Categories tab, searching for slug:australia in each of them.