Cannot delete files downloaded by Go module (2018)
cmd/go: leave $GOPATH/pkg/mod directories writable (removable) · Issue #27161 · golang/go
                  
Comments

      

  



  




      
    


      


      

      

          
bradfitz




        changed the title
Can not remove $GOPATH/pkg

cmd/go: can not remove $GOPATH/pkgAug 22, 2018

    

      


      
  
            

      

          
josharian




        changed the title
cmd/go: can not remove $GOPATH/pkg

cmd/go: cannot remove $GOPATH/pkgAug 23, 2018

    


    

      

          
andybons




          added
  the 

  NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
 label


      Sep 4, 2018

    






      


      

      


      


      

      


      

      


      
  
            

      

          
rsc




        changed the title
cmd/go: cannot remove $GOPATH/pkg

cmd/go: leave $GOPATH/pkg/mod directories writableOct 25, 2018

    


    

      

          
rsc




        changed the title
cmd/go: leave $GOPATH/pkg/mod directories writable

cmd/go: leave $GOPATH/pkg/mod directories writable (removable)Oct 25, 2018

    


    

      

          
rsc




          added
  the 

  NeedsFix
The path to resolution is known, but the work has not been done.
 label


      Oct 25, 2018

    


    

      

          
gopherbot




          removed
  the 

  NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
 label


      Oct 25, 2018

    






      


      


      
  This was referenced Feb 12, 2019


      


      
    
  freeformz 

      pushed a commit
        to heroku/heroku-buildpack-go
      that referenced
      this issue

    
      May 7, 2019
    
    
      Go modules writes a bunch of stuff in $GOPATH/pkg/mod as read-only.
Standard rm -rf throws an error when it encounters read-only files.
So find the files that are read-only and make them not read-only.

See also: golang/go#27161
    
  


  

        

        


        

        


        


        
    
  epk 

      pushed a commit
        to Shopify/heroku-buildpack-go
      that referenced
      this issue

    
      Feb 5, 2020
    
    
  
  
        
  

    
      Go modules writes a bunch of stuff in $GOPATH/pkg/mod as read-only.
Standard rm -rf throws an error when it encounters read-only files.
So find the files that are read-only and make them not read-only.

See also: golang/go#27161
    

  

        


        


        


        
    
dims



    mentioned this issue
    
      Apr 20, 2020
    


        


        
  
          

  

    
  amorenoz 

      added a commit
        to amorenoz/sriov-network-device-plugin
      that referenced
      this issue

    
      May 21, 2020
    
    
  
  
        
  

    
      Files downloaded by 'go mod' are not writable (removable).

Use the recommended way of cleaning modules [1]

[1] golang/go#27161 (comment)

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
    

  

  

  

    
  ahalimx86 

      pushed a commit
        to k8snetworkplumbingwg/sriov-network-device-plugin
      that referenced
      this issue

    
      May 25, 2020
    
    
  
  
        
  

    
      Files downloaded by 'go mod' are not writable (removable).

Use the recommended way of cleaning modules [1]

[1] golang/go#27161 (comment)

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
    

  

  

    
  SchSeba 

      pushed a commit
        to SchSeba/sriov-network-device-plugin-1
      that referenced
      this issue

    
      Jun 7, 2020
    
    
  
  
        
      
        
  

    
      Files downloaded by 'go mod' are not writable (removable).

Use the recommended way of cleaning modules [1]

[1] golang/go#27161 (comment)

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
    

  

  

    
  SchSeba 

      pushed a commit
        to SchSeba/sriov-network-device-plugin-1
      that referenced
      this issue

    
      Jun 8, 2020
    
    
  
  
        
      
        
  

    
      Files downloaded by 'go mod' are not writable (removable).

Use the recommended way of cleaning modules [1]

[1] golang/go#27161 (comment)

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
    

  

  





        


        


        


        

        


        


        

      

          
golang




        locked as resolved and limited conversation to collaborators


      Jan 6, 2021

    



  
  



  

