What do I do about an unfixable F when I am applying for a graduate program? I studied three years as a History major, and I received many bad grades. So I transferred out to a different school in its computer science program. 

I have completed up to third year (and a little bit more) of my CS degree in the last two years. I recently looked up the available course listing from my previous school and, once again, they are not offering the course that I received an F in.

It is a third year elective course in philosophy and they haven't offered it in the last two years. The school does not offer any course that is similar, and no one (including many advisers I spoke to at both schools) can really say that there is an alternative course that is equivalent to that course.

Basically, I can't fix it. I've retaken some courses that I did poorly in from my previous school, and gotten back positive results. My current GPA (exclusively from my current school) is close to 3.9.

But that F is really freaking me out. I'm not even hopeful that I can get into a top graduate school, but I would at least like to get into a decent one. 

What can I do about this?
Computer science professors don't care what grades you got in philosophy. Even more so because this was an advanced philosophy class, not an entry-level course. And even more so because this was 3+ years ago before you started computer science, so it doesn't show an inability to reason or communicate or manage your time. 

Better yet, you have a very clear narrative. When your application isn't perfect, it's nice to have a simple, clean, verifiable reason for the imperfection. In your case, it's very simple: you were terrible at philosophy, you're great at computer science. This is a great narrative, and the F only adds to it.

You should focus on computer science. Here's what's going to happen: the committee will look at your transcript and very quickly figure out that you were terrible at philosophy and good at computer science. Then they're going to want to know how good at computer science you are -- merely average? Or amazing? This is where your research, publications, letters of recommendation, advanced coursework, etc. comes in. Further, you should be very careful when writing your statement of purpose -- you'll need to address your previous major, but there's no need to make excuses for it, just say that it wasn't a good fit and then focus on your current work. 

Even if you could retake that class and get rid of the F, you shouldn't bother. It just doesn't gain you anything, and there are better uses for your time.