How to delete locked files mac terminal

If so, the solution is to empty the Trash and then drag the file to the Trash. Rename the volume or folder.

  • File in use? Track down the app that’s responsible?
  • melhor tema mac para windows 7;
  • mac sublime text 2 crack.
  • Deleting: Problems Deleting Files.

The solution is to change the name to remove the characters. Further, if the volume that a file is on contains these characters, the file may also refuse to delete. The solution here is to change the name of the volume. If needed, you can change the name back after deleting the file. Create a new folder. Create a new folder, place the uncooperative item in it, move the folder to the Trash, and empty the Trash.

Boot from Mac OS 9. Boot from Mac OS 9, and delete the file there. Before switching to Mac OS 9, remove the problem file from the Trash and place it in a location that you can view easily when you're booted in Mac OS 9, such as the root level of your Home directory. Thus, if you do not remove the file from the Trash in Mac OS X, you will need to locate and move the file with a utility such as File Buddy that allows you to view and manipulate invisible files.

The Trash folder is called.

  1. How to Unlock Files on Mac (and Folders, of Course);
  2. Learn How to Lock/Unlock Files and Folders on Your Mac | DefragMac;
  3. chargeur mac book pro ne marche plus;
  4. hinh anh thuy hanh mac bikini.
  5. como editar arquivo hosts mac!
  6. mac os x 10.6.8 software update not working?
  7. Part 1: Introduction of Removing Locked Files;
  8. Trash and is located at the root level of your Home directory. In the unlikely case that Mac OS X does not permit you to remove the item from the Trash, deleting the file in Mac OS 9 will again require accessing the invisible Trash location. Use XRay or a similar utility.

    If you cannot delete a file because you do not have the needed permissions, open the file with XRay and change the permissions.

    Terminal command to delete a folder filed with locked files?

    Make yourself the owner of the file, for example, and make sure that the owner has both read and write access. Now you should be able to delete the file. BatChmod includes a Force Empty Trash command that automates this process and appears to work well in most situations. Use a delete utility. Several utilities may be able to empty the Trash when the Finder refuses to do so.

    DropNuke is the name of one such utility. These utilities do not always work, but they are worth a try. Repair the disk. First Aid may repair a problem that is preventing the files from being deleted. Delete a user's account. Here's a special case: If the files to be deleted are in a user's account, and that user no longer works on your Mac, you can delete the user's account via the Users System Preferences window.

    Select the name, and click Delete User. Now you can delete or move the files as you see fit. Use Unix.

    How to Delete Locked Files in Mac OS X Manually. Try

    When all else fails, turn to Unix, which will always be able to delete your file. I explain exactly what to do in the following section. After you delete a User's account via the Users System Preferences window , neither the user's folder nor its contents is deleted. Instead, the word Deleted is added to the name of the former user's Home directory.

    At this point, the deleted user can no longer access the folder. The Home directory of the deleted user reverts to the ownership of the admin user who deleted the account. As an administrator, you can save any files you want by copying them elsewhere and then drag the rest of the folder's contents to the Trash.

    Force Empty Trash in Mac OS X When File is Locked or In Use

    You cannot simply delete the folder itself, however. If you try to drag this folder to the Trash, an alert message appears:"The item ' user name Deleted' cannot be moved to the Trash because it cannot be deleted. The former user's Home directory is deleted.

    • option key on uk mac keyboard.
    • Part I: Introduction of Remove Locked Files;
    • How to delete stubborn “in use” and locked files?
    • nhac cho mac dinh viettel 2012;

    The Finder may not display this change immediately. You may have to relaunch the Finder or log out and log in again to see the effect. Note: In general, do not attempt to move or delete the folders in the Users directory or the Users directory itself. Doing so is an almost-certain recipe for disaster. Although I prefer Aqua-based methods whenever possible, at times, the only path to success is through Terminal.


    Problems deleting files are examples. There are two main methods to try. If one fails to work, move to the other. I have never failed to have success with them. Use chflags. The chflags change flags command can turn off a Unix lock attribute that prevents a file from being deleted. With the flag off, you should be able to return to the Finder and delete the file.

    Further reading

    Follow these steps:. Open the Trash window in the Finder, and drag all the files you want to delete to the Terminal window. Use rm. The rm remove command deletes files in Unix. In most cases, if the basic rm command would work, choosing the Empty Trash command in the Finder would have worked just as well, so there would be no point in bothering with rm. The need for it arises when you want to delete an item of which you are not the owner and changing the owner name had no effect or in any odd situation for which the preceding suggestions did not work.

    In this case, using the remove command with root access via the sudo command should do the trick. A third method is to download a utility like LockMeBaby from Soramimi Works which performs the above steps for you. Dec 24, AM in response to herschel50 In response to herschel The 'Locked' checkbox is grayed out, can't be unchecked.

    Share your voice

    Here's the output:. Question: Q: How to delete 'locked' folders from Trash? More Less. Communities Contact Support. Sign in Sign in Sign in corporate. Browse Search. Ask a question. User profile for user: danskky danskky. And thanks a lot guys! All replies Drop Down menu. Loading page content. Desktops Speciality level out of ten: 0. Dec 23, AM in response to danskky In response to danskky Try holding alt key when selecting Empty the Trash. Reply Helpful Thread reply - more options Link to this Post. Mac OS X can experience difficulty deleting certain files due to the following and other reasons:. You can also restart, which may put an end to lingering processes that are unnecessarily making use of files you are attempting to delete.

    Try to deselect the box next to "Locked. In this case, try one of the following:. Use Secure Empty Trash The simplest workaround and the first one you should try is to drag the problematic file to the Trash, then while in the Finder select "Secure Empty Trash" from the "File" menu.

    Change lock flag via Terminal You can also manually unlock files via the Terminal with the following command:. After which you can attempt deletion from the Trash, or use the Terminal delete command listed below. Use Force Delete Finally, there is a freeware application dubbed Force Delete that can sometimes delete persistently locked and otherwise stubborn files.