Technology in terms you understand. Sign up for my weekly newsletter, "Confident Computing", for more solutions you can use to make your life easier. Click here.

Is it Safe to Delete This File?

//
My C: and D: drives have many gigabytes of .DAT files under “Documents and Settings”. I’m trying to free up space on the C: drive. Can I delete any of these files? I really don’t know what they are, how they got there, or why they occupy so much space on my computer!

I don’t know.

Honestly, I have no idea either what they are, how they got there, or why they occupy so much space. That’s the problem with “.dat” files — there’s no way to know what they are without more information.

But I do have some ideas on how to determine if deleting them is ok, and ways to do it safely — and those ideas apply to any file type, not just “.dat”.

Become a Patron of Ask Leo! and go ad-free!

.DAT?

First, I need to reiterate: there’s no way to know what a “.dat” file is without knowing what program created it. The file extension “.dat” is a generic extension, often used to represent nothing more specific than “data”. As a result, it is used by many, many applications. There’s no way to know what the file contains, or what to do with it, without first knowing which application created it.

So, how do you determine if a file — any file — matters?

Well, my first suggestion is the most important one.

Back up first

Deleting DataBefore you do anything, back up the files. Copy them to thumbdrives, copy them to another computer, take an image backup of your machine, if you like, just do something, anything, so if you discover that you really did need that file after all, you can get it back.

You may find the file is an important part of some application you rely on daily; or worse, an application you only use once a month or so. If you simply delete the file, it’s gone without reasonable hope of recovery. If you’ve backed it up somehow, you’ll not only be able to remove it from your system, you’ll be able to put it back if you discover removing it was a mistake.

Safe delete

My next steps are fairly simple.

First, rename the file or files. Use your computer for a while. Reboot. If an error occurs related to the missing original file name, you now know what the file was about, and can decide what to do based on the error you get. If you discover no errors, you’re ready to move to the next step.

Next, delete file or files. (You did back them up, right? Right?) Same exercise. Use your computer for a while. Reboot. Use it for different things to exercise some of the applications you have on the machine. Once again, if an error occurs related to the now missing file, you now know what the file was about, and can decide appropriately based on the error you get. If you discover no errors, you’re done. Sort of.

Last, remember that you deleted the file and where you put the backup. Our simple tests above may not actually have fired up the application or scenario that required the file. You may not find out until some lengthy time down the road that … whoops! … the file you deleted some months ago turned out to be part of an application you haven’t touched in ages. Hence, again, the importance of the backup.

If you can’t delete

If you can’t delete or rename the file, it’s possible that’s because the file is in use.

That’s great! It tells you that the file matters. If you like, you can then use a tool such as Process Explorer to figure out what program’s using it. Once you figure that out, you can once again decide the right course of action based on knowing which application is accessing the file.

Play

Video Naration

15 comments on “Is it Safe to Delete This File?”

  1. Is it safe to delete every single .log file on my computer? I noticed it takes up a lot of space, and quite honestly I do not want logs of everything going on in my computer. So, is it safe to do or will it hurt my computer somehow?

    Reply
  2. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    If you’re not sure, just follow the instructions in the
    article. 🙂

    Leo

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.7 (MingW32)

    iD8DBQFILdGACMEe9B/8oqERAmvJAJ4wxp3FZIDREUH3BfU4HpOb/9rbkwCfe4Nq
    g0MKKW2VvOMPER7SiRudws0=
    =hGVu
    —–END PGP SIGNATURE—–

    Reply
  3. I already have .dat files or .txt files but they never be more than 50 MB , Surely I’m too still didn’t know is these all files necessary or not but generally it’s not harm for me to let them without deletion , thanks Leo for useful article ..
    http://www.fosdir.com

    Reply
  4. I received a low storage message which sugggested deleting unnecessary files. My hard drive is a 30+GB and thought it unusual to be low so I check and sure enough, I’m out of room. Question is can I safely move files from the C drive to a secondary hard drive, which files are ok to move, and how do I go about moving them to free room on my C drive?

    I would first try to figure out what’s using up all that disk space. This article would be a start: Where’s my disk space going?

    – Leo
    11-Oct-2008
    Reply
  5. Jhon, instead of deleting the files yourself you should use a maintenance program like CCleaner or Advanced System Care – both are free , safe and easy to use.

    Reply
  6. I’m not suggesting this is a particularly sophisticated solution but if you make a diary note of the date and delete files to the Recycle bin and then, umpteen weeks or months later, if you find you’ve accidentally deleted something you need, you can go to the Bin and restore it.

    Ask-Leo Rocks!

    Reply
  7. If you do a search using “*.dat”, you get a lot of info on just what the .dat file is related to, plus a date and size of the .dat file. Doing this you find files for programs you have removed from the harddrive, or are real OLD.

    Reply
  8. I wanted to know if you get rid of the “back up copies” of your system .dat and the user.dat files?….I am not interested in backing up the files that have already been backed up…I would appreciate the answer to this question..thanks
    Fran Perry Windows XP

    Not sure which backups you’re referring to. (But in general: better too many than too few.)

    Leo
    02-Sep-2010

    Reply
    • The files system.dat and user.dat are part of the Windows registry. You can’t, and really don’t want to, delete them.
      It’s safe to delete the backup copies, it’s just that you won’t be able to revert the changes made to the registry after those backup where made. If you have several, keep only the latest if it’s less than a month old. Those older than a month are obsolete.

      Reply
  9. Instead of copying and deleting those files, I usually move them to another drive. The end result is identical, but doing it this way assures that you’ve backed up the file before deleting. If you copy and delete them in two steps, you may accidentally delete one you thought you backed up.

    Reply
  10. Thank you so much for this article, it explains things so nicely. I am so happy to have discovered Ask Leo. You’ve saved the day for me countless times. You are the best.

    Reply
  11. Other suggestions for exploring what a DAT file is: Look at the root folder where it’s located. A DAT file doesn’t typically exist directly under “Documents and Settings” or the “Users” folder under Windows 7 and above. It exists under a folder tree, typically under a folder with an application’s name, so at least you find what application it’s associated with. Next, look at the file’s time/date stamp. If it’s stamped seconds after you booted your machine, it may be related to the OS, otherwise if its two years old, it’s probably safe to delete it (after backing it up). A trick that may give you an idea about a DAT file’s association is to get a copy of the file, change the copy file name’s extension to .txt, and open it with Notepad. Sometimes there will be readable text at the top of the file associating it with some application (of course, the rest of the file may look like gibberish). Finally, the obvious: Google the file name!

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.