Safe to remove - .rnd and .CFUserTextEncoding

As a cleanup routine, I remove files from ~/Library/Logs and ~/Library/Caches directory.

I also remove ~/.Trash and ~/.DS_Store

My question - Is it safe to remove ~/.rnd and ~/.CFUserTextEncoding?

What are these files/folders for?

enter image description here


Solution 1:

  • .CFUserTextEncoding is used to store defaults for language and encoding
  • .rnd is used as entropy bytes to aid in randomness algorithms
  • .DS_Store holds your Finder preferences for viewing that folder
  • .Trash is the terminal version of your macOS trash can

Deleting files you don't understand is generally considered a really terrible idea. For macs, we sometimes get lucky because the OS will kindly regenerate many of these for you after you delete them, but I would not count on always being saved this way. These files take up nearly no space, do not hurt anything, and deleting them has no benefit and causes their almost immediate recreation.