Is it safe to delete .steam folder full of broken symlinks after uninstall of Steam?

Really do apologize if this is a very noobish question.

The problem with broken symlinks associated with Steam, especially Source engine mods, is a known issue. As far as I was able to understand, there is no adequate fix for this.

Ok. So after broken symlinks number reached a whopping 14000 (half of which was introduced in the last month), I finally decided to completely uninstall all Steam games and also various tools like Proton, LinuxRuntime, etc. That did not fixed symlink number.

And also uninstalled Steam itself. Did not fix it either.

Also there is now /home/user/.steam folder, and it shows 20kb disk space usage in Thunar file manager. While the /home/user/.steam/steam/steamapps/ folder shows 5Gb. I have no idea why this discrepancy, but guess it might be related to this broken symlink issue. In any case:

Question: Is deleting .steam folder in this particular case safe? Will delition of .steam folder fix the broken symlinks introduced by Steam?

Also, just to be on the safe side: Is there any special way to remove this folder, or the regular way by selecting it, pressing “Delete” button, and emptying “Trash” folder will work?

This is a logic answer (not a knowledge answer). Before you ever installed Steam, there was no .steam folder.
If you delete it, and reinstall Steam, then it would probably be recreated as if you had just installed Steam for the first time.
Whether every single relationship with Steam will be gone, that I don’t guarantee.

Thanks for your answer.

Will all of the contents of the folder be deleted also? Or due to broken symlink issue, there might be leftover files after deleting .steam folder? After all, .steam folder is 20kb, while its contents are 5Gb+.

If you remove Steam the .steam folder in your home-folder will stay because when you reinstall Steam after having removed it you are still able to login without having to re-authenticate. It’s not until you delete that folder that you have to re-authenticate with Steam. Also applications shouldn’t remove anything in your home-folder, but that hasn’t always been the case by bugs that have done that.

Thanks. In general, I know these general facts more or less, that pacman does not touch the home folder.

But I’m not sure what to do in this particular situation, especially taking into account thousands of broken symlinks are in play, and also the discrepancy with disk usage. So I’m asking, what is the correct and safe way to handle this .steam folder, in this particular case.

If you are unsure if it is “Safe” To delete something try renaming it first. Its always easier to change the name back if problems occur.

Ok. I risked and copied .steam folder and ~/.local/share/Steam folder into an external hdd, and then deleted them on system disk, and checked for symlinks. Now there are around 3k, mostly in proc and run. All but a couple of Steam related broken symlinks are gone.

Since both proc nor run are only pseudo-filesystems created by the kernel, this not a problem.

I don’t think that’s true, if the folder already exists it will not be re-created. Which is why this folder also doesn’t get removed when you uninstall steam.

Yes, I said if you deleted it (.steam). So why are you rebuttaling me about it existing?
You’re probably correct, but it’s not what I said.

Next time, instead of removing the whole folder to get rid of broken symlinks, you could just delete the broken symlinks and retain all your other files and steam settings.

Find and show broken symlinks:

find ~/.steam -xtype l

Delete broken symlinks with confirmation:

find ~/.steam -xtype l -exec rm -i {} \;

Delete all broken symlinks without confirmation:

find ~/.steam -xtype l -delete

All commands work recursively in subdirs.

I think it’s quite odd to mark your own reply as solution, as I told you so a few replies before that. If you’re going to mark your own reply as your solution you might as well not have started the topic to begin with because you could have tried what you marked as solution before starting the topic. :wink:

I didn’t know whether it was safe or not.