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

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

share|improve this question

2 Answers 2

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 1 hour ago

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.