I'm trying to delete two folders on a drive on an Ubuntu server which were created by Windows (drive previously mounted on Windows and their content is just garbage now).
I've tried everything I can think of, with the errors returned being very different:
chmod 777the directories (No such file or directory)rmwithsudoand correct options (Permission denied)- Tried to delete by inode number via
find(Directory not emptyorPermission denied)
Hierarchy structure:
/media/mattgeek/programmi/WindowsApps/- SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/ - Apps/ (Unknown content not visible with ls -al) - AppxMetadata/ CodeIntegrity.cat - Assets/ (Unknown content not visible with ls -al) chrome_elf.dll - locales/ (Unknown content not visible with ls -al) - swiftshader/ libEGL.dll libDLESv2.dll/media/mattgeek/programmi/WpSystems/S-1-5-21-2951927762-82725512-1342253419-1001/- AppData/ - Local/ - Packages/ - SpotifyAB.SpotifyMusic_zpdnekdrzrea0/ - Settings/ (contains an inaccessible file with unknown inode and unknown permissions)
These are the outputs of the commands I've tried (in root mode):
rm -f /media/mattgek/programmi/WindowsAppsrm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/chrome_elf.dll': No such file or directory rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
rm -rvf /media/mattgek/programmi/WindowsAppsrm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
rm --recursive -f /media/mattgek/programmi/WindowsAppsrm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
# Directory inode number: 479380 find . -inum 479380 -deletefind: cannot delete './media/mattgeek/programmi/WindowsApps': Directory not empty
# Directory inode number: 479380 find . -inum 479380 -exec rm -rf {} \;rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
Commands give similar results for /media/mattgeek/WpSystems, its subdirectories, and files.
rm -rvf /media/mattgek/programmi/WpSystem