109

Have you noticed that disk space is filling up fast even when your Linux computer's trash folder is empty? There's a strong possibility that VS Code is responsible for it.

A not-so-recent issue in the Snap version of VS Code has cropped up again, and there's no fix in sight.

An Absurd Bug

When you normally delete a file, it goes into the trash folder, located at ~/.local/share/Trash. GNOME has supported automated emptying of the trash at selected intervals through its settings for quite some time now.

So, let's say you delete trash every seven days.

top 28 comments
sorted by: hot top controversial new old
[-] FauxLiving@lemmy.world 49 points 4 days ago

TL;DR:

When you delete in VS Code it stores the files in

~/snap/code/<version#>/.local/share/Trash

Which isn't automatically emptied by gnome like ~/.local/share/Trash

Updating the package also creates new copies of this directory under a new version, leaving orphaned files/directories which contain data that you deleted.

[-] Ptsf@lemmy.world 17 points 4 days ago

Honestly this should be treated as a security vulnerability as well as a general bug, no?

[-] FauxLiving@lemmy.world 10 points 4 days ago

The lines get kind of blurry, it's a bug that allows people executing code as your user(not sure the specifics of snap's security) to see things that you thought you deleted.

This doesn't give an attacker anything particularly useful. If they have that level of privileged already there are much more fruitful avenues of attack that don't require digging through your trash.

[-] Ptsf@lemmy.world 6 points 4 days ago

Fair enough. I just operate under the assumption deleted means deleted, I'd never toss Auth keys in userspace but I could absolutely see myself placing them temporarily in scripts I'd delete later.

[-] excel@lemming.megumin.org 25 points 4 days ago

So just typical Snap behavior then

[-] Feyd@programming.dev 25 points 4 days ago
[-] BradleyUffner@lemmy.world 4 points 3 days ago

This sounds more like a snap / gnome integration problem than a bug in Visual Studio Code.

[-] Railcar8095@lemmy.world 5 points 3 days ago

Doesn't even seem to be a snap issue itself, but on how this snap package was developed. It feels weird defending snap, but they m means blaming Microslop so it's OK

[-] supersquirrel@sopuli.xyz 10 points 4 days ago

Weird, does Emacs do that?

[-] Telorand@reddthat.com 6 points 4 days ago
[-] protogen420@lemmy.blahaj.zone 4 points 4 days ago

emacs leaves recovery files eberywhere by default

[-] mesamunefire@piefed.social 8 points 4 days ago

I hate snaps.

[-] darthsundhaft@piefed.social 4 points 4 days ago

So what do you guys use if not using vscode? Asking 'cause I don't want to use Microshit.

[-] sbeak@sopuli.xyz 7 points 3 days ago* (last edited 3 days ago)

I am currently using VSCodium, which is basically VSCode built from the VSCode repo without the Microsoft bits. Somebody else has also suggested Eclipse Theia (the website pushes hard on AI because investors or something like that, but the editor itself is pretty okay. It is also compatible with the same extensions as VSCode/Codium which is pretty cool) but I've just gotten used to using VSCodium.

Of course, you have the people suggesting vim and its derivatives, which are apparently super powerful once you get used to them. Helix is another one that is kind of like Neovim but preconfigured with features that most people would want built in. I've only tried neovim once, it seems pretty cool, but I'm personally not bothered enough to go through the steep learning curve. VSCodium suits my needs just fine. If you're the kind of person who likes that sort of stuff it would be nice though. Kate (by KDE) is also a good code editor esp. if you use KDE Plasma.

One gem I found was Lite XL. It's a really lightweight editor written in Lua, super barebones, and there's a whole plugin ecosystem around it!

[-] luciole@beehaw.org 5 points 3 days ago

I'm experimenting with Kate. Doesn't come close in terms of features but useful for small stuff. It's like Notepad++ for Linux.

[-] Die4Ever@retrolemmy.com 2 points 3 days ago* (last edited 3 days ago)

I like Kate as a fancy notepad, I use it for taking quick notes or opening a txt file I downloaded. I have it set to start up into a new blank document, so it works more like Windows Notepad.

I still use VSCode for real programming though.

Kate did well at searching for text inside binary files though, I recently used it to see which DLL an error message was coming from, VSCode couldn't do it.

[-] BlameTheAntifa@lemmy.world 2 points 3 days ago

Jetbrains has free non-commercial licenses for open source projects. If not that, I’ll use Kate.

I won’t touch anything associated with Microslop. Not Windows, not Github, not Office, and not VS Code.

[-] logging_strict@programming.dev 3 points 4 days ago

Using geany. It's simple tabbed text editor which does not get in your way.

it's not awesome; just does the job and has zero ambition to march towards enshittification

[-] tux0r@snac.rosaelefanten.org 2 points 3 days ago

Mostly GNU Emacs, but my $EDITOR is sam.

[-] PokerChips@programming.dev 3 points 4 days ago

NeoVim with tmux is pretty awesome.

Some people like Helix though.

[-] paris@lemmy.blahaj.zone 2 points 4 days ago

I use micro editor in the terminal

[-] wer2@lemmy.zip 2 points 4 days ago

Either Emacs or Neovim.

[-] mrcleanup@lemmy.world 2 points 4 days ago

Linux noob here. Is this something everyone needs to worry about, or would I know if I had installed this cancer?

[-] vk6flab@lemmy.radio 6 points 4 days ago

Depends on how you install the software.

If you used snap to install it, then this affects you.

From the article, uninstall the software and use a .deb, .rpm or flatpack installer instead.

Essentially the snap version has a long standing bug that causes deleted files to be stored outside the normal "trash can" structure.

[-] Die4Ever@retrolemmy.com 5 points 4 days ago* (last edited 4 days ago)

Even if you installed this it's not usually going to be a big deal

Use a disk space analyzer program like Filelight

https://flathub.org/en/apps/org.kde.filelight

Or https://flathub.org/en/apps/org.gnome.baobab

[-] lukalix98@programming.dev 1 points 3 days ago

Well, it is worrying to some extent. One can use the computer normally if said problem is present, but it could hinder you in some ways. If you see your disk becoming abnormally large, you should probably check what's taking so much space, in this case it was snap version of VSCode, but then snap is usually frowned upon. What can I say, the least you can probably do is stay informed if those things bother you, but then again it's easy to find solutions on the internet if you can't keep up.

[-] verdi@tarte.nuage-libre.fr 1 points 4 days ago

*Microslop BS code! 

this post was submitted on 04 Feb 2026
109 points (98.2% liked)

Linux

12131 readers
362 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS