HOWTO uninstall GIT old version?

HOW to uninstall GIT old version on CentOS7?

Hello everyone!! This is a common requirement of every GitOps engineer task.  After a while the older version you may not feel to continue once you see the latest version same way for Git.

Uninstall Git from CentOS

Assuming that you have Linux box already Git installed and want to remove it due to:

  1. Git long back on a CentOS7. 
  2. The installed version with yum command might be pulled older version due to repo not sync with the latest Git changes 
First you need to check your git version using

git --version

Let see this Example:
[vagrant@mydev ~]$ git --version
git version 1.8.3.1

Here to uninstall you need root access, switch to root user
sudo -i

Sample
 [vagrant@mydev ~]$ sudo -i [root@mydev ~]#

 If you installed git by using yum package manager then same will be used to remove it. yum remove git

[root@mydev ~]# yum remove git
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.3.1-20.el7 will be erased
...
Dependency Removed:
  perl-Git.noarch 0:1.8.3.1-20.el7

Complete!

Confirm this by running once again version command.
[root@mydev ~]# git --version
-bash: git: command not found
You might be also interested to learn more on Git

  1. Installation of Latest Git on CentOS7
  2. Git Commands
  3. Git Branches
  4. Git Merge

 Questions:
1. What if the Git version changes do that repositories also gone?
2. How do we migrate the Git repo from Git's older version to new version?
3. How do we migrate Git repo to GitLab/any other SCM tool?

Comments

Popular posts from this blog

Ansible Jinja2 Templates: A Complete Guide with Examples

Ansible 11 The uri module with examples

Jenkins Active choices parameter - Dynamic input