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.

I saw this post: Prevent gnome-shell's dash from listing Recent Items and I'm not able to remove the recently.used.xbel file.

Do I need to be root to do this?

-rw------- 1 ryan ryan 39157 2012-02-19 15:47 /home/ryan/.local/share/recently-used.xbel --

When I run

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

I get

rm: cannot remove `/home/ryan/.local/share/recently-used.xbel': Operation not permitted

Running the same command with sudo returns the same error, and running nautilus as root also returns a similar error.

share|improve this question
    
maybe that file is been used, try to remove on startup... –  Gerep Feb 28 '12 at 1:13
2  
Did you set it immutable at some point with chattr? –  infinity Feb 28 '12 at 1:32
1  
what infinity said. Try ´sudo chattr -i ~/.local/share/recently-used.xbel´, and then try to delete the file again. –  severin Feb 28 '12 at 13:53

4 Answers 4

up vote 2 down vote accepted

what infinity said. Try ´sudo chattr -i ~/.local/share/recently-used.xbel´, and then try to delete the file again.

– @severin

This did the trick. Thanks

share|improve this answer

~/.local/share/recently-used.xbel is in your home directory and belongs to your current user, so in short I can say: no, you don't need to be root to delete it.

But you need to be more specific about your problem.

share|improve this answer
    
When I run: rm ~/.local/share/recently-used.xbel'code' I get rm: cannot remove `/home/ryan/.local/share/recently-used.xbel': Operation not permitted –  rylhunt Feb 27 '12 at 21:15

Try running: lsof |grep recently-used.xbel

This should show if some process has a lock on that file.

You can also try: rm -f ~/.local/share/recently-used.xbel

share|improve this answer

You could just do a

gksudo nautilus

or which filemanager you are using and simply browse to the file and delete it.

share|improve this answer
    
I still get "Error removing file: Operation not permitted" –  rylhunt Feb 27 '12 at 21:44

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.