Uninstalling pre-installed Visual Studio Code (VSCode) in Aurora/UBlue? How to remove?

Problem

VSCode is pre-installed in Aurora dev edition. I, however, may have reasons not to like to use (or having installled, for that matter), the official Microsoft Visual Studio Code. E.g.

I can easily install install VSCodium from flathub to solve this[1], but the question is how do I uninstall thge pre-installed VSCode then, given I don’t need it anymore?

Tried research

I searched the repo and some stuff turned up:

BTW I have no idea what where this service is (aurora-dx-user-vscode.service) and I also could not find it nor the binary of it (systemctl [--user] status aurora-dx-user-vscode.service and /usr/libexec/aurora-dx-user-vscode yield no results). Or does it auto-delete itself?

On the live system it seems to be installed without sandboxing on the host system:

$ code --version                                      
1.104.3
385651c938df8a906869babee516bffd0ddb9829
x64

This may, as indicated, not be what I want?`

Tried solutions

Some naive ways fail:

$ rpm-ostree remove code
error: Package/capability 'code' is not currently requested
$ rpm-ostree remove vscode          
zsh: correct 'vscode' to '.vscode' [nyae]? n
error: Package/capability 'vscode' is not currently requested
$ rpm-ostree remove visualstudiocode
error: Package/capability 'visualstudiocode' is not currently requested
$ rpm-ostree remove visual-studio-code
error: Package/capability 'visual-studio-code' is not currently requested

I also really could not find out how it is actually installed and also checking the official VSCode installation guide only yields sudo dnf install code, which also just shows code as the package name, which I already tried uninstalling.

Question

So how can I uninstall the pre-installed VSCode (to switch to Codium/flatpaked, Codium e.g.)?


  1. Actually to have a stronger sandbox you can also revoke the flatpak-spwan permission or the big filesystem option, but that is a different topic ↩︎

  1. flatpak IDEs suck, this also is with vscodium

  2. create a custom image if you want to remove vscode.

There is no other way to cleanly remove it.

(Potentially) the long term solution might be for vscode to be installed via brew. Note I am just an observer of the work the ublue team has done: GitHub - ublue-os/homebrew-tap . (they even have a tap for vscodium).

In the short term a custom image that just calls “dnf5 -y remove code” should work.

You can also hide vscode from showing up with the “menu editor”.

Do not remove it with rpm-ostree, it will slow down your updates significantly, take up more space (yes!) and may prevent your computer from updating properly due to local changes to the image.

1 Like

I am aware of the limitations of flatpak’ed IDEs, but really for my use cases VsCodium always worked. I mean if you want you can install sdks for your programming language and then that fits mostly 90% of what one possibly does. And if one really needs it can flatpak-spawn a shell or so on the host, if one wants that.

Anyway, that’s off-topic. As for a custom image. Yeah, okay but then it has to be uninstalled via rpm/dnf too? Would a dnf remove vscode work then?
Because given rpm-ostree does not find that package I would have guessed the package name I am trying to use is wrong?

That’s a good idea though I don’t know how to do that on GNOME out of my head here haha.

Also as mentioned you can install vscodium with our brew tap ( GitHub - ublue-os/homebrew-tap )

but with a custom image you can just use dnf in your build file to remove code

Can’t it be removed via an override? It’s not a pretty solution, but it’s a workable one.

SOURCE: Rpm-ostree remove a single or multiple packages? + some more combined actions syntax questions - Fedora Discussion

1 Like

You can do that, but it’s a horrible solution. See my previous comment.

Indeed I mixed that up as it is not overplayed you need to use this command:

rpm-ostree override remove code

Or make a custom image yeah ill see maybe doing the proper solution later.

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