What is the ~/.var folder used for and is it safe to remove the content within this folder?
- 8,675
2 Answers
The ~/.var directory is normally used for Flatpak, since it stores its installed programs and their data. But, it could also be another program that's writing into that directory. Hope this helps.
- 141
-
1Should it be a part of the "home backup" or it is safe to skip it? – Alexander Skvortsov Dec 27 '22 at 10:59
-
~/.var doesn't hold the flatpak programs, only their data (eg. firefox; profiles, bookmarks, etc.). The programs are under /var/lib/flatpak. – John Eikenberry Sep 10 '24 at 18:34
Well, /var contains variable data files. This can include spool directories and files, administrative and logging data, and transient and temporary files.
Since it's under your home directory, it's probably safe to assume that files under ~/.var serve the same purpose as files under /var except that they are for your user only.
Perhaps an application that you use is storing important files there. You can certainly inspect the files yourself.
A good rule of thumb is that if you don't know what something does in a system or config folder, it's best to leave it alone.
- 12,744
~/.var/appcontains those apps' cache and data files. – James Westman Jul 20 '21 at 14:59