google-sheetsgoogle-drive-api

Remove shared file from MyDrive


I clicked on a Google Spreadsheet link in a Stack Overflow question. The spreadsheet was copied to My Drive but now I can not delete or remove it.

In the past I simply made a copy of the shared spreadsheet and then would delete the original shared link.

Selecting the file from My Drive and hitting the delete key doesn't work. The "remove" option is dimmed from the context menu.


Solution

  • I believe your situation is as follows.

    In this case, the accessed file is shown in your "shared with me" folder. The file has no Trash button. And also, this file cannot be removed even when Drive service (DriveApp) and Drive API are used, because of no permission.

    When I got such a file, I always move the file manually to the trash box on my browser. By this, the file can be removed from "shared with me" folder.

    In this case, please directly move manually the file to the trash box by drag and drop, because the trash box button on the file is disabled. By this, the file can be removed from "shared with me" folder.