1

GTK remembers a lot of stuffs like the last folder I used when you try to "Save As" in any application, the size of the "Open File" window. Is there a way to remove that?

I have cleared:

rm -f "${HOME}/.local/share/recently-used.xbel*"
rm -f "${HOME}/.local/share/user-places.xbel*"

but that doesn't seem to be do it. Is there a way to clear the entire GTK ecosystem cache? I have a cleanup script that always restores my Linux box to its original state and I am trying to improve it.

  • 1
    Did you check whether your commands removed the files? – user1686 Nov 7 '19 at 6:21
  • @grawity, oops it doesn't - I added quotes for bash strings without testing. Do I have to avoid quoting * like rm -f "${HOME}"/.local/share/recently-used.xbel* for the expansion to work? Sorry I am still learning shell scripting. Also, hopefully that solves the issue :-). – Nishant Nov 7 '19 at 8:24
2

The history is not wiped because your command doesn't even delete the files. (And the -f option hides all error messages that would have shown up otherwise.)

In shell, wildcards are only expanded when they are not quoted at all. You would have to use either:

rm -f "$HOME/.local/share/recently-used.xbel"*

rm -f "$HOME"/.local/share/recently-used.xbel*

rm -f ~/.local/share/recently-used.xbel*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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