When you install any programs with root access on Linux-based operating systems, you may receive a Permission Denied error if you try to delete the remaining files or folders. As a result, you cannot delete the file or folder.
How to Delete an Undeleted File or Folder in Linux
For example, you are using the Linux Mint or Ubuntu operating system, and you have created a new file/folder on the desktop. Since you are logged in to the system with a non-root user, you can quickly delete the file/folder you created.
However, in some cases, when you install a program that requires root access, you may encounter files and folders that cannot be deleted anywhere or on the desktop. Therefore, when you try to delete these files and folders, you will usually receive a Permission Denied error.
On Linux, you can use Terminal to delete such files and folders that cannot be deleted. You can delete files that cannot be deleted using the Linux RM command by switching to Root in the Terminal.
How to Remove Files and Folders by Using Terminal on Ubuntu, Debian, Linux Mint, Kali Linux
We will use the Linux RM command to delete an indelible folder that we encountered on Linux Mint 18/19. On Linux, you can delete files, directories, and folders using the RM command.
To remove files on Linux or delete folders, follow the steps below.
Step 1
As you can see in the image below, there is a folder on Linux Mint that cannot be deleted. When you try to delete it, you will usually receive a Permission Denied error.
Try to delete the vmware-tools-distrib folder as follows.
Step 2
You will receive a Permission Denied error, as in the image below.
Step 3
Open the Terminal on Linux and execute sudo su to access Root, then type your root password and press Enter.
Step 4
On Linux, you can use the ls command to display the directory in your current location. To delete the undeleted folder, execute rm -rf vmware-tools-distrib.
rm -rf vmware-tools-distrib
Step 5
As soon as you execute the “rm -rf vmware-tools-distrib” command, you can see that the folder has been elected.
Deleting a File That Cannot Be Deleted ⇒ Video
To delete an undeletable file or folder on Linux Mint 18/19, you can watch the video below and also subscribe to our YouTube channel to support us!
Conclusion
In this article, we have examined step-by-step how to delete permission-denied files or folders. Thanks for following us!
thanks
You’re welcome!
thank you !
You’re welcome!
thanks for the helpful article.
You’re welcome. Thanks for your comment.
Thanks for the article !!!
Such a helpful and easy to understand Great work !!!
You’re welcome!
Thanks
You’re welcome!