Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In every home-directory on my Ubuntu Server is a .cache folder containing an empty file motd.legal-displayed. Is there a way to stop creating these .cache folders?

share|improve this question
    
I assume it is motd.legal-displayed? –  Rinzwind Feb 14 '13 at 14:47
    
The .cache folder in your home directory is used by lots of different things, so I wouldn't try to delete it unless I needed to free disk space. It's safe to delete it if you're willing to sacrifice performance. See the XDG base directory specification –  Flimm Feb 15 '13 at 14:41

1 Answer 1

up vote 3 down vote accepted

See man update-motd and /etc/update-motd.d

Disable motd

See /etc/pam.d/login and comment out the line that has session optional pam_motd.so in it. You might also want to do this in /etc/pam.d/sshd if ssh is also a concern.

Completely remove motd

This will remove anything related to motd (so also motd.legal-displayed):

sudo apt-get remove --purge update-motd
share|improve this answer
    
I commented out these two lines and no more .cache folders were created. However, the complete removal of motd did not work. –  ph3nx Feb 14 '13 at 23:32
    
@PascalGläser probably needed sudo in front of it (edited). –  Rinzwind Feb 15 '13 at 6:45
    
No that's not the problem I'm logged in as root. It says Package update-motd is not installed, so not removed. –  ph3nx Feb 15 '13 at 14:12
    
Aha. Then it is weird you had that file and the config file on your system. Then again: the purge is not required anyways ;) –  Rinzwind Feb 15 '13 at 14:15
    
Yes it's weird! Thanks for your help, commenting out these lines solved my problem :) –  ph3nx Feb 15 '13 at 14:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.