Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
I assume it is – 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
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 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

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

Yeah, it seems the motd files now live inside another package instead. Package update-motd says superceded by pam_motd in libpam-modules and since whole libpam-modules can't be removed (?), to remove motd we have to remove the files manually:


and if you like:

/usr/share/man/man5/update-motd.5.gz  (libpam-modules)
/usr/share/man/man8/pam_motd.8.gz  (libpam-modules)
/usr/share/base-files/motd  (base-files)
/etc/update-motd.d/  (base-files)
/usr/share/man/man5/motd.5.gz  (manpages)
share|improve this answer

Your Answer


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.