How to Delete Permission Denied File/Folder in Linux? – If you install any programs on Linux based operating systems with root access and you want to delete the remaining files or folders, you can get a Permission Denied error and as a result you can not delete the file or folder.
How to Delete Permission Denied File/Folder in Linux?
For example, you are using a Linux Mint or Ubuntu operating system and created a new file/folder on the desktop. Since you are logged in to the system with a non-Root user, you can easily delete the files/folders you created.
However, in some cases, when you install a program that requires root access, you may encounter files and folders that can not be deleted anywhere or on the desktop. So, if you try to delete these files and folders normally, you will get a Permission Denied error.
On Linux you can use Terminal to delete these types of files and folders that cannot be erased. By switching to Root in Terminal, you can delete files that can not be deleted using Linux RM command.
How to Remove Permission Denied File and Folder in Linux Distributions Such As such as Ubuntu, Debian, Linux Mint, Kali Linux using Terminal?
On Linux Mint 19/Linux Mint 18, we will use the Linux RM command to delete a permission denied folder. On Linux, you can delete files, directories, and folders using the RM command.
Follow the steps below in order to delete permission denied files or permission denied folders.
As you can see in the following image, there is a permission denied folder on Linux Mint. If you try to delete this folder normally, you will get a Permission Denied error.
Try to delete the vmware-tools-distrib folder as follows.
You will get a Permission Denied error as follows.
Open the Terminal on Linux and execute the sudo su command to switch to root access, then type your root password and press Enter.
On Linux, you can view the directory you are in with the ls command. To delete the permission denied folder on Linux, execute rm -rf vmware-tools-distrib.
rm -rf vmware-tools-distrib
Once you apply rm -rf vmware-tools-distrib command, you can see that it removed the permission denied file/folder.
How to Delete Permission Denied File/Folder in Linux? ⇒ Video
To delete a file or folder that is not deleted on Linux Mint 19/Linux Mint 18, you can watch the following video and you can also subscribe to our YouTube channel to support us…
In this article, we have discussed how to delete files or folders that can not be deleted in Linux. Thanks for following us!
If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!
Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!