Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

How do I delete one item from the list of 10 "recent documents" in LibreOffice Writer?

share|improve this question

It seems there should be an easy, built-in way of doing this, but there's not (yet?). LibreOffice is now storing user settings and Recent_Documents history in one file. On my system it is:


It is an xml document, and extracting the history of just one document is not straight forward.

There was a history plug-in (forgot the name) that used to work, but it no longer works for me. I created a script/one-liner to delete the entire recent-documents history. It searches for and removes tags of the form: <item ...HistoryInfo> ... </item>

    perl -i -pe 's#<item[^>]+?HistoryInfo.+?</item>##g' $HOME/.libreoffice/3/user/registrymodifications.xcu

The usual disclaimers apply:

  • always back up the file first
  • understand a script before you execute it
  • use at your own risk
share|improve this answer

This is the one for LibreOffice 4.0x in Ubuntu 12.04 LTS:

perl -i -pe 's#<item[^>]+?HistoryInfo.+?</item>##g' $HOME/.config/libreoffice/4/user/registrymodifications.xcu  

It works for me, but as stated before: use at your own risk.

share|improve this answer
I believe that some explanations on what this command is expected to do would be helpful to be able to understand the risk. – Boris Oct 4 '15 at 8:29

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.