I cleaned up my system today emptying /tmp, /var/tmp and /var/log, something which I do from time to time; a bit absent minded I also deleted the content in /var/cache this time.
I’m curious about what I might have done with the system, should I expect some difficulties to occur after this?
So far, though, the system seems to run as normal, but it would be nice to have some comments and suggestions on this.
I would expect the folder to be recreated when needed, but I would not remove /var/cache in the future. Have you already restarted your PC to see what happened?
On 2013-10-28 01:16, F Sauce wrote:
>
> Hello!
>
> I cleaned up my system today emptying /tmp, /var/tmp and /var/log,
> something which I do from time to time; a bit absent minded I also
> deleted the content in /var/cache this time.
Why var log? It is controlled automatically, and the logs help solve
problems. Just adjust the controls so that logs are rotated sooner.
> I’m curious about what I might have done with the system, should I
> expect some difficulties to occur after this?
Yes, you could say so.
> So far, though, the system seems to run as normal, but it would be nice
> to have some comments and suggestions on this.
Restore the directory from your backup.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
I would expect the folder to be recreated when needed, but I would not remove /var/cache in the future. Have you already restarted your PC to see what happened?
Yes I have rebooted, still no difference as I have noticed. I searched around briefly and my impression was that the crucial part of /var/cache had to do with package managers, apt, pacman etc; I did not read anything openSUSE specific but rebuilt the zypper DB just in case (for what it might be worth?) as I noticed that zypper also uses that directory.
Why var log? It is controlled automatically, and the logs help solve
problems. Just adjust the controls so that logs are rotated sooner.
OK, perhaps I could have had some use for them now:)
Earlier, I did in fact use RAM for /var/log, as well as for /tmp, /var/tmp and /var/spool; when I read up on SSD drives mounting these directories, or at least /tmp, was, as I understood it, considered good practice. I see your point though.
>> Why var log? It is controlled automatically, and the logs help solve
>> problems. Just adjust the controls so that logs are rotated sooner.
> OK, perhaps I could have had some use for them now:)
> Earlier, I did in fact use RAM for /var/log,
Wow, in RAM. I must be one of those control freaks, that’s something I
would never do :-p
A log in RAM would not help if you learn about a problem after rebooting
But yes, I also see that you would not like logs in flash. Wear.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
This is what I have in a 12.2 system in /var/cache at the momentt:
boven:/var/cache # l
total 56
drwxr-xr-x 14 root root 4096 Dec 11 2012 ./
drwxr-xr-x 16 root root 4096 Dec 11 2012 ../
drwxr-x--- 2 wwwrun root 4096 Jul 31 14:36 apache2/
drwxrwxr-x 3 root lp 4096 Oct 27 21:47 cups/
drwxr-xr-x 2 root root 4096 Dec 14 2012 fontconfig/
drwxr-xr-x 2 root root 4096 Apr 6 2013 gio-2.0/
drwx------ 2 root root 4096 Oct 23 20:11 ldconfig/
drwxr-xr-x 3 root root 4096 Aug 24 2012 libx11/
drwxr-xr-x 38 man root 4096 Oct 24 14:30 man/
drwx------ 2 root root 4096 Aug 4 2012 multipath/
drwxrwxr-x 2 root man 4096 Aug 15 2012 susehelp/
drwxr-xr-x 2 root root 4096 Mar 9 2013 systemtap/
drwxr-xr-x 2 root root 4096 Dec 11 2012 xdm/
drwxr-xr-x 5 root root 4096 Aug 28 10:55 zypp/
boven:/var/cache #
It does not seem to have very recent info ((today is 2013-10-28).
In any case, I would recreate /var/cache with owner, group and access bits as shown above if this is not already done spontanious. And then look if it gets populated again
I have 3 more directories in there: apparmor, texmf, and gdm.
Anyway, I would not create the directories manually, but just reinstall the corresponding packages: (the /var/cache directory itself is contained in the package “filesystem”)
# rpm -qf /var/cache/*apache2-2.2.22-10.8.1.x86_64
apparmor-parser-2.8.1-3.1.1.x86_64
cups-libs-1.5.4-5.2.1.x86_64
fontconfig-2.10.2-2.2.1.x86_64
gdm-3.6.2-4.2.1.x86_64
libgio-2_0-0-2.34.3-2.1.1.x86_64
glibc-2.17-4.7.1.x86_64
xorg-x11-libX11-ccache-7.6-14.1.1.noarch
filesystem-12.3-9.1.1.x86_64
multipath-tools-0.4.9-7.2.1.x86_64
susehelp-2009.10.06-17.1.1.noarch
systemtap-2.0-2.4.1.x86_64
texlive-filesystem-2012.67-4.5.1.noarch
file /var/cache/xdm is not owned by any package
libzypp-12.15.0-1.17.1.x86_64
Of course you only need to reinstall those that you have installed in the first place…
Thank you for posting the content you’ve got in /var/cache.
I haven’t done any manual recreation nor re-installation of any packages but the directory has repopulated itself with some dirs already, hopefully that indicates that the directory just rebuild dirs when called for and that not too much vital information has been lost.
To me ‘cache’ carries so much the notion of temporariness; must be the reason why I did this stupid act, deleting something without checking what it is!