Search code examples
flutterdartarchlinuxpacman-package-manager

Flutter : /opt/..../FETCH_HEAD exists in filesystem Arch


While I'm updating and installing some packages on Arch Linux:

sudo pacman -Syu && sudo pacman -S --needed \
webkit2gtk \
base-devel \
curl \
wget \...

I got following error:

error: failed to commit transaction (conflicting files)
flutter: /opt/flutter/.git/FETCH_HEAD exists in filesystem
Errors occurred, no packages were upgraded.

Solution

  • Fixed with sudo rm -rf /opt/flutter/.git/FETCH_HEAD