Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to uninstall Code when built from source and installed with meson #1070

Closed
Skaldebane opened this issue Jun 12, 2021 · 9 comments
Closed
Labels
Priority: Wishlist An enhancement or feature request Status: Blocked Something else needs to be done before this can be fixed

Comments

@Skaldebane
Copy link

What Happened

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.

@jeremypw
Copy link
Collaborator

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
Copy link
Contributor

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.

@Skaldebane
Copy link
Author

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.

By the way, even the install target needs sudo.

@jeremypw
Copy link
Collaborator

jeremypw commented 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).

@jeremypw jeremypw added Priority: Wishlist An enhancement or feature request Status: Blocked Something else needs to be done before this can be fixed labels Dec 8, 2021
@jeremypw jeremypw 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. Dec 8, 2021
@Skaldebane
Copy link
Author

Your wording is a little weird here, how exactly "install Flatpaks with Code"? Do you mean "install the Flatpak version of Code"?

@jeremypw
Copy link
Collaborator

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
Copy link
Author

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)

@jeremypw jeremypw 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 Dec 11, 2021
@jeremypw
Copy link
Collaborator

jeremypw commented Jul 7, 2023

Closing as later versions of meson/ninja automatically have an uninstall target so Code can be (mostly) uninstalled with sudo ninja uninstall.

@jeremypw jeremypw closed this as completed Jul 7, 2023
@Skaldebane
Copy link
Author

Great news! Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Wishlist An enhancement or feature request Status: Blocked Something else needs to be done before this can be fixed
Projects
None yet
Development

No branches or pull requests

3 participants