You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a way to uninstall Code when built from source and installed with meson #1070
I installed elementary Code from source, but now I want to remove it. I'm used to use things like make uninstall which do just that for many other projects, but apparently this project is using meson (and I'm aware of problems with uninstalling that are caused by the nature of meson, and are still discussed in various issues) and it provides no way of removing it.
Expected Behavior
There should be a command like sudo ninja uninstall (or sudo ninja code-uninstall for that matter (see this issue about meson)).
Steps to Reproduce
Just install and Tada! You can't remove it reliably without missing something behind.
Platform Information
OS: Fedora 34 Workstation (x86_64)
DE: GNOME 40.1
elementary Code: Built and installed from source, a week ago.
At the moment it is intended that Code only build and install Flatpaks, which are relatively easy to uninstall. You are right that elementary meson projects at least do not provide an "uninstall" target at the moment, which can be a nuisance.
There should be a command like sudo ninja uninstall
AFAIK, there's already a ninja uninstall target made by meson itself. But that don't remove files created by custom scripts and external commands. So, locale files and gschemas need to be removed manually.
different of the install target, this target need to be executed with sudo.
Yeah that's why I mentioned the issue about ninja, in which there's a comment talking about the possibility of making something like sudo ninja uninstall-code with all the required scripts. I never worked with any of these tools and I don't know how they specifically work, but from what I've read this should still be possible, although tricky and not so straightforward to the user.
Reducing scope to Flatpaks only as there is no obvious way to implement it for native meson installs. If and when the facility to build and install Flatpaks with Code is implemented it would make sense to add a facility to uninstall such packages (but not before).
changed the title [-]Add a way to uninstall the app when built from source.[/-][+]Add a way to uninstall Flatpak when built from source with Code.[/+]on Dec 8, 2021
I mean "Add a way to uninstall a Flatpak package after it has been built from source using the Code app". Its a little hard to find a succinct description. I am trying to limit the scope of this issue to only address the situation that a Flatpak package has been built and installed by using the proposed future facilities of Code (#940). I do not think Code should be able to uninstall an arbitrary Flatpak - that is the job of AppCenter or other package manager. However undoing one of its own actions is valid.
But that's not what I meant here. I am talking about uninstalling Code itself from the system.
I installed the latest version of Code on Fedora from source, but the default GNOME Gtk theme messed it up, so.... I tried removing it from my system. I've built apps from source before, and most of them can be uninstalled easily using a shell script (not using meson), not this one though.
Now I removed it from the system fully by manually searching for any files it might've added and removing them, but here I'm asking if there's a possibility to make this an easier one-command process.
This is related to meson apparently (as I linked in the original question).
(I know, there are workarounds for the theming issue, but I'll wait until a proper version of Code lands in elementary's Flatpak repo with a built-in theme)
changed the title [-]Add a way to uninstall Flatpak when built from source with Code.[/-][+]Add a way to uninstall Code when built from source and installed with meson[/+]on Dec 11, 2021
Activity
jeremypw commentedon Jun 12, 2021
At the moment it is intended that Code only build and install Flatpaks, which are relatively easy to uninstall. You are right that elementary meson projects at least do not provide an "uninstall" target at the moment, which can be a nuisance.
Marukesu commentedon Jun 14, 2021
AFAIK, there's already a
ninja uninstalltarget made by meson itself. But that don't remove files created by custom scripts and external commands. So, locale files and gschemas need to be removed manually.different of the install target, this target need to be executed with
sudo.skaldebane commentedon Jun 17, 2021
Yeah that's why I mentioned the issue about ninja, in which there's a comment talking about the possibility of making something like
sudo ninja uninstall-codewith all the required scripts. I never worked with any of these tools and I don't know how they specifically work, but from what I've read this should still be possible, although tricky and not so straightforward to the user.By the way, even the install target needs
sudo.jeremypw commentedon Dec 8, 2021
Reducing scope to Flatpaks only as there is no obvious way to implement it for native meson installs. If and when the facility to build and install Flatpaks with Code is implemented it would make sense to add a facility to uninstall such packages (but not before).
[-]Add a way to uninstall the app when built from source.[/-][+]Add a way to uninstall Flatpak when built from source with Code.[/+]skaldebane commentedon Dec 9, 2021
Your wording is a little weird here, how exactly "install Flatpaks with Code"? Do you mean "install the Flatpak version of Code"?
jeremypw commentedon Dec 10, 2021
I mean "Add a way to uninstall a Flatpak package after it has been built from source using the Code app". Its a little hard to find a succinct description. I am trying to limit the scope of this issue to only address the situation that a Flatpak package has been built and installed by using the proposed future facilities of Code (#940). I do not think Code should be able to uninstall an arbitrary Flatpak - that is the job of AppCenter or other package manager. However undoing one of its own actions is valid.
skaldebane commentedon Dec 11, 2021
But that's not what I meant here. I am talking about uninstalling Code itself from the system.
I installed the latest version of Code on Fedora from source, but the default GNOME Gtk theme messed it up, so.... I tried removing it from my system. I've built apps from source before, and most of them can be uninstalled easily using a shell script (not using meson), not this one though.
Now I removed it from the system fully by manually searching for any files it might've added and removing them, but here I'm asking if there's a possibility to make this an easier one-command process.
This is related to meson apparently (as I linked in the original question).
(I know, there are workarounds for the theming issue, but I'll wait until a proper version of Code lands in elementary's Flatpak repo with a built-in theme)
[-]Add a way to uninstall Flatpak when built from source with Code.[/-][+]Add a way to uninstall Code when built from source and installed with meson[/+]jeremypw commentedon Jul 7, 2023
Closing as later versions of meson/ninja automatically have an
uninstalltarget so Code can be (mostly) uninstalled withsudo ninja uninstall.skaldebane commentedon Jul 8, 2023
Great news! Thanks for the update.