If you have inactivated your category, but there are active courses within that category, the library will continue displaying the category.

You will have to inactivate all of the courses to hide that entire category.