Recently I have encountered an issue with steam. If you turn off your computer too fast, steam will register a game you were running as uninstalled. In my case it is GTA V. I have looked far and wide but only found that I should start installing and then steam will recognise the previous files. The problem is, I don't have enough space to start the download to be able to register it. I have slow internet and don't want to wait 5-7 hours to reinstall the game.
If anyone is encountering the same problem with a different game, find the app manifest and replace it with the one in steamapps. The app manifest tells steam what an installed game is, so if you still have the game files you can replace the manifest if you dont have enough space. If you do have enough space then you can just discover the files by hitting install and steam will do the rest.