Xbox not detecting hdd anymore!

So i used horizon and deleted some save files from my hdd and now i put it back in my xbox and i need to install a update and i can’t because the hdd is not getting detected. What should i do to get it working?
It still works when i connect it to my pc.