How can I delete an undeletable Linux network folder from my desktop?

somerandomdude 0 Reputation points
2024-03-14T21:43:36.07+00:00

User's image

I used to have a Linux Virtual Machine and used a network folder to pass files from my host to the VM about a year and a half ago. Today, I found an inaccessible and undeletable Linux folder on my desktop, and I don't know how it got there since my network discovery option is off. Can anyone help me delete this folder?
EDIT: so i just wanna say that i havent openned this VM for about a year and a half so im not sure how this folder just randomly came to my desktop all i think is this may be related to my WSL app... (Windows Subsystem For Linux)

Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
674 questions
{count} votes

8 answers

Sort by: Most helpful
  1. Michael Taylor 49,356 Reputation points
    2024-03-14T22:02:52.36+00:00

    Unless it is a junction point or virtual file system link then nothing is truly undeletable. However I'm struggling with the "on my desktop" part. The desktop is just a folder with files or, more ideally, shortcuts. As such you should be able to go to your desktop and delete anything off it.

    But now we get into security. If the folder is locked down by an admin account then you'll need to be an admin to remove it. If you are an admin, you have confirmed the UAC prompt and you still cannot delete it then it is possible that the file is owned by the system. In that case you can go to the Properties/Security tab, take ownership of the folder and then you should have access after the changes are applied. If you don't see security options at all then it is most likely not a regular folder.

    If that doesn't work then the next step would be to look to see if any linux-related stuff is still installed, like a virtual redirect driver, that owns the folder. In that case you'd need to remove the extra stuff. I wonder about Windows Subsystem for Linux here...

    If that still doesn't work then reboot in safe mode and navigate using the shell to where the folder should be. Try deleting it from there.

    Screenshots and additional information may help provide better suggestions from the forum.


  2. Bruce (SqlWork.com) 58,856 Reputation points
    2024-03-14T22:12:50.2666667+00:00

    linux files has permissions for owner, group, everyone, the permission are: r = read (4) , w = write (2), e = execute (1) (they are actually bits). the ls function will also prefix d if file is a directory

    ls -l <filename>

    to delete a file you need write access to the folder containing the file. to delete a folder it must be empty. you can do both with

    rm -fR <foldername>

    you can run the command as admin (generally mount points are only write for sysadmin):

    sudo rm -fR <foldername>

    if this fails, the the containing folder is readonly, and you must change to the containing write, delete folder, then remove write access from the containing folder. see chmod to change file/folder permissions.


  3. Yanhong Liu 3,585 Reputation points Microsoft Vendor
    2024-03-15T02:21:11.95+00:00

    Hello,

    To delete such a folder, you can try the following methods:

    1. Safe Mode: Restart the computer to enter safe mode, sometimes in safe mode, the lock of the file system may be lifted, so that the folder can be deleted.
    2. End the process: Check to see if any background processes are still trying to access the folder, such as background services that may still be running on the virtual machine software. Finish all the processes that might be related to them and try to delete them.
    3. Admin permissions: Right-click on the folder, select "Properties", and make sure you have full control in the "Security" tab. If that doesn't work, log in with an administrator account and try to delete it.
    4. Command: First, get into the root user with the following command: sudo -i. Then switch to the path where the folder is located: cd folder path. Finally, delete the file or folder with the following command: rm -rf filename.

    Note that you should be careful when using this command as it permanently deletes files or directories and cannot be recovered. Make sure that the file or directory you want to delete is correct to avoid misuse.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Yanhong Liu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.


  4. somerandomdude 0 Reputation points
    2024-03-17T19:37:00.9066667+00:00

    so i just want to correct something u guys said "try to delete with cmd" i cannot do that due to the file being undetectable by cmd so i am confused what do i do to delete this file as the delete option doenst work (NOTE: Properties also doesnt work) User's image

    0 comments No comments

  5. somerandomdude 0 Reputation points
    2024-03-17T20:08:49.58+00:00

    oh just to clarify copying and pasting the file just crashes the app that shows u what ur copying / moving and other stuff here is screenshot:User's image

    this makes me really think that the file is corrupted but i used chkdsk and it said no problem was found, doesnt chkdsk find corrupted files?

    0 comments No comments