Well i’d say that the best way to get it to work is to wipe the sd card and start again to ensure there is nothing that isn’t supposed to be installed as if you get it working it may cause errors later down the line.
You can try remove the things you installed via apt-get by using sudo apt-get remove “file”, but that’s not guaranteed to work.