Accidentally deleted ~/.local/share/

I’ve been using EOS for around a year so I wouldn’t say I’m a newbie but I’ve made a newbie mistake:

I was trying to delete the contents of ~/.local/share/icons as I’d extracted a folder there that I no longer wanted.

I accidentally deleted ~/.local/share/ because I was not paying attention (please minimize roasting, I understand the gravity of sudo rm -r and run pure arch on another laptop, I’m just an impulsive idiot):

sudo rm -r ~/.local/share/*

From what I know and have read there is no way to recover from this; however, I cannot access any application from my desktop including Konsole (!). These are the notifications I am receiving:





Does anyone have any advice regarding how I should proceed / whether I’ll be able to remedy this situation (without a complete reinstallation)?

Did you recreate the directory?

mkdir ~/.local/share

Also, have you logged out and logged back in again?

1 Like

I can’t access konsole because ‘You are not authorized to execute this file’ – which is most of the problem. ~/.local/share itself was not deleted, just all of the contents. Obviously, I was using konsole when this happened so I know that much but I closed konsole (poor decision) and cannot reopen. And, yes, I’ve restarted a few times.

Also, you would never need to run anything with elevated privilege under your home directory.

1 Like

It wouldn’t allow me as my user (for good reason obviously) but, again, I thought I was deleting ~/.local/share/icons/* :confused:

Can you get into a tty (ctrl+alt+F1 or 2 or …), create it from there.

2 Likes

I suspect that you might have run sudo or a GUI application as root that had changed the ownership of some files and/or folders under your home directory.

Everything under home should belong to your user therefore no need to do things with sudo in there.

5 Likes

Yes I can get into tty – ~/.local/share/ exists and contains some new files. When I closed konsole last night, it contained only kwalletd (despite running sudo rm -r ~/.local/share/*). It now contains:

baloo flatpak kactivitymanagerd klipper krunnerstaterc kscreen kwalletd sddm user-places.xbel user-places.xbel.bak user-places.xbel.tbcache

I opened user-places.xbel and noticed triple-slash paths (which I’ve never seen before?). I thought this might be the issue but I rather ask you all before editing…

<bookmark href="file:///home/harriet">
<bookmark href="file:///home/harriet/Desktop">
<bookmark href="file:///home/harriet/Documents">
<bookmark href="file:///home/harriet/Downloads">
<bookmark href="file:///home/harriet/Documents">
etc ...

Similarly, in krunnerstaterc:

[PlasmaRunnerManager]
LaunchCounts=1 exec:///usr/bin/konsole

3 slashes is normal there.

1 Like

From a tty:

sudo chown -R <your-user:your-user> ~/.local/share

??? Other than that, use the install media to rescue your files and reinstall?

I never used to recommend reinstall, but 15-20 minutes vs hours of faffing around :smiley: :smiley: This is why I have good backups!!!

If your config is still messed up, I would suggest you can create a new user, then login the new user, then copy your data and some configs from the old user to the new user. That would be faster than fix the old user.

3 Likes

You can create anothe user, and copy ~/.local/share from it, and chown it.

3 Likes

yeah I did that yesterday and none of the recommendations solved the weird inability to open the applications from my desktop…but, I was able to access the application launcher, and from there, it did let me open the add/remove software window. I just reinstalled everything kde / plasma related and it did fix that problem. Unfortunately, something I updated or reinstalled knocked me off wifi so I need to figure that out today lol

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.