In some climates, yes. Rosemary can spread quite a bit and become difficult to control. Always check local guidelines before planting it in your garden.