Helping people with computers... one answer at a time.

A dirty machine is the result of improper shut downs. There are ways to clean it up, but getting control of your shut down process is important.

How do I make the C drive not dirty? I'm running Windows 7, Ultimate. I found out that my drive is dirty and this is because my laptop battery always gets drained so the system was not shut down properly. I tried running CHKDSK, but it displays an error that it can't access my drive and that I need to do a System Restore. But when I tried to do a System Restore, I can't because it says something is wrong with my C drive. Is there another way to fix this?

In this excerpt from Answercast #41, I look at the errors that can occur on a computer that is not shut down properly and how to start cleaning it up.

Checking the disk

First off, I definitely recommend against relying on System Restore for just about anything.

I'm really surprised that CHKDSK is directing you to system restore. That's normally not what happens.

What should happen, in a case like this, is that CHKDSK might tell you that it is unable to check-disk the drive because it's in use. What it will normally do in situations like that is it will ask you if would you like to schedule this check-disk to happen the next time you boot up. The correct answer in a situation like that is yes and then reboot your machine.

When your machine reboots, CHKDSK will run and fix up the dirty drive.

What's a dirty drive?

What a "dirty drive" means is simply what you described:

  • It simply means that the operating system was unable to write all the data that it needed to the drive before the system was shut down.

And it's caused by exactly what you described, losing power without shutting down the system properly.

  • The only way to avoid this is not to let happen what has been happening.

Don't let the battery drain to the point where the machine shuts itself down. Definitely shut the machine down cleanly. By cleanly, I mean use the Start menu to start the shut down process. Part of that process will be to mark the drive as being clean before the power is removed from the system.

There's no other way to do that. You have to shut down the system cleanly.

If the power dies

Allowing this to happen, by and large, puts you at risk of actual data loss.

  • The problem is that the data that may not have been written to the disk could be important.

That's why you always want to make sure that you shut down your system by using the Start menu to start the shut down process.

Article C5662 - August 5, 2012 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

Natalie Kehr
August 7, 2012 9:56 AM

I can appreciate why an operating system buffers data before writing it to an external medium, but is there a way of forcing the writing of data to external media? At the moment a typical sequence is:-
1. Open application A.
2. Use A to write to an external drive.
3. Try to remove the external drive, but can’t because it is “in use”
4. Close applications. (A and Windows Explorer, and sometimes other programs)
5. Try to remove the external drive, and this time, with luck I may be told it is OK to remove the drive.
6. Restart Application A and other applications.
Rather than use Windows Explorer, I use Power Desk and its File Finder, and keep those programs constantly open. When I use an external drive, at step 4 I always have to close both Power Desk and File Finder. I seem to remember that before I installed Power Desk, I always had to close Windows Explorer.

Have I missed some trick? Is there a way of forcing the emptying of write buffers without shutting applications.

If we had better control of when applications physically write to files, surely drives would be cleaner.

What you're experiencing isn't a write buffer issue. Those programs actually have the device open. Unless they explicitly provide a way to close the device (sometimes it means simply switching the view to a different drive) they only solution is to close the application. I experience this on a semi-regular basis myself.
August 7, 2012 10:00 AM

Hi Leo, Re: proper shutdown. Due to lightning & thunderstorms I must shutdown very frequently. I click the start and the red box shows. I then select "log off". That brings up the change user
screen. There is another red box with 3 choices:
restart, sleep, and shutdown. I click on "shutdown". This gets me offline in about a minute. I run Windows 7 Pro 64 bit. Is this a proper shutdown. CHKDSK also has switches /f /r
and it can be run without a switch. Thanks!!!

Mark J
August 7, 2012 1:35 PM

Yes, that is the proper shutdown procedure. Chkdsk without a switch defaults to checking without repairing.

August 8, 2012 9:37 AM

Leo, if one does not enable write caching (right click My Computer > properties > Device manager > right click the C drive > properties > policies) and uncheck "Enable write caching on the device" does not this force Windows to write to the hard drive immediately and thus in the event of a power disruption one should have little if any unwritten data and less "dirt" on the hard drive?

It still has to write that data sometime, and if the power failure happens during the write you can have problems. With caching turned off it actually has to physically write more often so I could make an argument that you're increasing the odds of a problem. That's just a semi-educated guess though.

February 5, 2013 9:04 PM

When shutting down Win7 I am getting the "force shutdown" page even when I've shut down all applications. This leads me to believe that there is some program, app or service still running that I can't see. How can I find out what may still be running? I've clicked "cancel" at the force shutdown page and then opened up task manager, but it does not show any applications running. Of course, there are many services and processes still running, but most of these shouldn't be causing the symptoms #if I understand "services" and "processes" correctly#. Is there some log that is generated during the shutdown procedure that I can look at once I reboot? Thanks.

Mark J
February 6, 2013 2:21 AM

When you get the Force shutdown message, you have the option to cancel the shutdown. In that case, I'd recommend getting a copy of Process Explorer. After getting the Force shutdown message, I'd stop the shutdown process and fire up Process Explorer to see which process might be hanging up the shutdown process.
Why are there always programs that don't respond when Windows is shutting down?
Process Explorer - A Free Powerful Replacement for Windows Task Manager
What's this program running on my machine?

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to to ask your question.