Skip to content

Commit 488d653

Browse files
authored
Merge pull request #711 from ldennington/add-uninstall-from-source-instructions
install-from-source: add instructions to uninstall
2 parents 14ff019 + 6dd3098 commit 488d653

File tree

3 files changed

+88
-26
lines changed

3 files changed

+88
-26
lines changed

README.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -93,32 +93,6 @@ sudo /usr/local/share/gcm-core/uninstall.sh
9393

9494
### Linux
9595

96-
#### Experimental: install from source helper script
97-
98-
If you would like to help dogfood our new install from source helper script,
99-
run the following:
100-
101-
1. To ensure `curl` is installed:
102-
103-
```shell
104-
curl --version
105-
```
106-
107-
If `curl` is not installed, please use your distribution's package manager
108-
to install it.
109-
110-
1. To download and run the script:
111-
112-
```shell
113-
curl -LO https://raw.githubusercontent.com/GitCredentialManager/git-credential-manager/main/src/linux/Packaging.Linux/install-from-source.sh &&
114-
sh ./install-from-source.sh &&
115-
git-credential-manager-core configure
116-
```
117-
118-
**Note:** You will be prompted to enter your credentials so that the script
119-
can download GCM's dependencies using your distribution's package
120-
manager.
121-
12296
#### Ubuntu/Debian distributions
12397

12498
Download the latest [.deb package](https://github.com/GitCredentialManager/git-credential-manager/releases/latest), and run the following:
@@ -142,6 +116,8 @@ sudo dpkg -r gcmcore
142116

143117
#### Other distributions
144118

119+
##### Option 1: Tarball
120+
145121
Download the latest [tarball](https://github.com/GitCredentialManager/git-credential-manager/releases/latest), and run the following:
146122

147123
```shell
@@ -156,6 +132,33 @@ git-credential-manager-core unconfigure
156132
rm $(command -v git-credential-manager-core)
157133
```
158134

135+
#### Option 2: Install from source helper script
136+
137+
1. Ensure `curl` is installed:
138+
139+
```shell
140+
curl --version
141+
```
142+
143+
If `curl` is not installed, please use your distribution's package manager
144+
to install it.
145+
146+
1. Download and run the script:
147+
148+
```shell
149+
curl -LO https://raw.githubusercontent.com/GitCredentialManager/git-credential-manager/main/src/linux/Packaging.Linux/install-from-source.sh &&
150+
sh ./install-from-source.sh &&
151+
git-credential-manager-core configure
152+
```
153+
154+
**Note:** You will be prompted to enter your credentials so that the script
155+
can download GCM's dependencies using your distribution's package
156+
manager.
157+
158+
To uninstall:
159+
160+
[Follow these instructions](docs/linux-fromsrc-uninstall.md) for your distribution.
161+
159162
**Note:** all Linux distributions [require additional configuration](https://aka.ms/gcm/credstores) to use GCM.
160163

161164
---

docs/faq.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,7 @@ and pick "Revoke access".
146146
![Revoke GCM OAuth app access](img/github-oauthapp-revoke.png)
147147

148148
After revoking access, any tokens created by GCM will be invalidated and can no longer be used to access your repositories. The next time GCM attempts to access GitHub.com you will be prompted to consent again.
149+
150+
### I used the install from source script to install GCM on my Linux distribution. Now how can I uninstall GCM and its dependencies?
151+
152+
Please see full instructions [here](./linux-fromsrc-uninstall.md).

docs/linux-fromsrc-uninstall.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Uninstalling after installing from source
2+
3+
These instructions will guide you in removing GCM after running the [install from source script](../src/linux/Packaging.Linux/install-from-source.sh) on your Linux distribution.
4+
5+
:siren: PROCEED WITH CAUTION :siren:
6+
7+
For completeness, we provide uninstall instructions for _the GCM application, the GCM repo, and the maximum number of dependencies*_ for all distributions. This repo and these dependencies may or may not have already been present on your system when you ran the install from source script, and uninstalling them could impact other programs and/or your normal workflows. Please keep this in mind when following the instructions below.
8+
9+
*Certain distributions require some dependencies of the script to function as expected, so we only include instructions to remove the non-required dependencies.
10+
11+
## All distributions
12+
13+
**Note:** If you ran the install from source script from a pre-existing clone of the `git-credential-manager` repo or outside of your `$HOME` directory, you will need to modify the final two commands below to point to the location of your pre-existing clone or the directory from which you ran the install from source script.
14+
15+
```console
16+
git-credential-manager-core unconfigure &&
17+
sudo rm $(command -v git-credential-manager-core) &&
18+
sudo rm -rf /usr/local/share/gcm-core &&
19+
sudo rm -rf ~/git-credential-manager &&
20+
sudo rm ~/install-from-source.sh
21+
```
22+
23+
## Debian/Ubuntu
24+
25+
**Note:** If you had a pre-existing installation of dotnet that was not installed via `apt` or `apt-get` when you ran the install from source script, you will need to remove it using [these instructions](https://docs.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-linux#uninstall-net) and remove `dotnet-*` from the below command.
26+
27+
```console
28+
sudo apt remove dotnet-* dpkg-dev apt-transport-https git curl wget
29+
```
30+
31+
## Linux Mint
32+
33+
**Note:** If you had a pre-existing installation of dotnet when you ran the install from source script that was not located at `~/.dotnet`, you will need to modify the first command below to point to the custom install location. If you would like to remove the specific version of dotnet that the script installed and keep other versions, you can do so with [these instructions](https://docs.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-linux#uninstall-net).
34+
35+
```console
36+
sudo rm -rf ~/.dotnet &&
37+
sudo apt remove git curl
38+
```
39+
40+
## Fedora/CentOS/RHEL
41+
42+
**Note:** If you had a pre-existing installation of dotnet when you ran the install from source script that was not located at `~/.dotnet`, you will need to modify the first command below to point to the custom install location. If you would like to remove the specific version of dotnet that the script installed and keep other versions, you can do so with [these instructions](https://docs.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-linux#uninstall-net).
43+
44+
```console
45+
sudo rm -rf ~/.dotnet
46+
```
47+
48+
## Alpine
49+
50+
**Note:** If you had a pre-existing installation of dotnet when you ran the install from source script that was not located at `~/.dotnet`, you will need to modify the first command below to point to the custom install location. If you would like to remove the specific version of dotnet that the script installed and keep other versions, you can do so with [these instructions](https://docs.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-linux#uninstall-net).
51+
52+
```console
53+
sudo rm -rf ~/.dotnet &&
54+
sudo apk del icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib which bash coreutils gcompat git curl
55+
```

0 commit comments

Comments
 (0)