I want to update my iMac OS X Mavericks Version 10.9.5 to OS X Yosemite 10.10.5. Do I need to backup my files ? or not ?. I'm afraid to update it because I don't want to erase my important files. I'm thinking that if I update my iMac all my files or my apps will be erase or reset .
First, always having a current & active backup should be priority #1.
OS X Installers (Updaters) are designed to be non-destructive and preserve all user data.
As long as no problems are encountered, your data should not be at risk.
With all that being said, make a backup.