Mac empty trash

a few days ago, after installing a new version of Quark-XPress, I put the older version in the trash and emptied it.
But I got a warning that certain items could not be deleted because “in use”.
I opened the Trash a found two folders: one is empty, the other one contains several empty folders. None of them is locked, yet every time I have to empty the trash, the same warning pops up.
I tried holding down shift or option key and select “Delete immediately”, but still I get the warning.
In the Terminal I typed sudo rm -R (with a space after R), I dragged the two folders (both, and even one by one), I typed the password and hit Return.
Yet the two folders are still in the Trash.
Running Disk Utility everything appears OK.

Edited: I do not have a second Mac to boot from.

Any idea how to get rid of the two stubborn folders? Thanks.

are they on the Main Mac disk?

Trash in Finder shows several folders joined.

A restart will stop whatever process is holding them busy and then you can empty the trash

@Christian Schmitz
The old version was on the only disk (no partitions).

@Norman Palardy
I restarted several times, yet I kept getting the warning.

I guess the old version of XPress kept some files somewhere that get loaded at start up.


maybe those files have some weird attributes on them ?
but you cant really tell without looking at them in terminal

and you can pop open terminal, type in "lsof +D " and the drag one of the FOLDER (+D only works on folders) in the trash that has this problem amd it will tell you what process is holding it
for a FILE you can use "lsof " then drag the file into the terminal window so its name gets entered

Move the files into /tmp folder, so you don’T see them and the OS will clear them out eventually on startup.

@Norman Palardy [quote] type in "lsof +D " and the drag one of the FOLDER…[/quote]
After dragging one folder (English.lproj) and hitting return Terminal does not show any message. Same behavior for the second folder (Resources).

@Christian Schmitz
Moved them into /temp, restarted, and trying to empty the trash the warning popped up.

I even put the Quark app into the trash and restarted, but after moving Quark to its proper place, the warning keeps popping up.

So I’m going to leave the two empty folders in /temp in order to empty the trash skipping the annoying warning.

Thank you for your suggestions.

Beware of auto-launch on boot.

Right-Click in the application icon (in the Dock) and activate the sub-menuitem (Options ?): you can see the command to “Open with the Session”.

I use Macintoshes since early 1980s and never have a case where I cannot empty the trash. I never used the Terminal to delete a file (or folder).

The hard part is to discover why the file (or folder) is locked.

The last trouble I had was with invisible folders in one of the Library folders: using a Xojo application alows me to change that.

I agree with you on all points.
I deleted all Quark folders and files in the several Libraries and restarted the machine several times. Yet…

@Carlo Rubini — To my knowledge, some extensions or attributes will automatically make a file “in use”, especially those related to “downloads in progress”, but I really cannot remember the details.

You may want to remove all extensions (or set them to .txt and alike) by using

sudo mv <theFileName>.<weirdExtension> <theFileName>.txt

Also, you can remove all the extended attributes (including Finder attributes) by using, with sudo if necessary:

xattr -c <theFileName>

Did you quit all applications before trying to empty the trash ?

The above let me think you may have the old XPress (or another application) running: you can clear folder contents, but not folders used by the application.

Use Command-Tab: it have to display only the Finder Icon. If it is not the case, you have that application running (the one with an icon/name there).

Did you try to boot on safe mode (press the shift key) ?

BTW: what is your used mac OS version ?

Here, on El Capitan, I just duplicated a file, locked it, put it in the Trash (and get a warning), checked, the file is still locked in the Trash) and empty the Trash: it is now empty (no other warning sent).

Last one: did you open the Trash and click in the “Emty” (?) button (top-right of the window) ?

@Emile Schwarz
Mac OS version 10.4.13

Only Finder running, and the folders as empty (no invisible items inside).
Tried also File > Empty but still getting warning.

About booting in safe mode: this is the only thing I did not do because I feared that, if the folders get destroyed, yet they are needed for some reason at booting time, then I may not be able to boot back into Mojave.
In other words, I’d better get them destroyed by Mojave itself (or keep them silent in /tmp as I’m doing now).
Am I unduly paranoid?
Thank you.

You also have something like: “clear right now” (Press the Option key and click in the File menu; then search in the menus).

But I have doubts.

empty?v : Empty the trash
empty [specifier] : “empty” and “empty trash” both do the same thing
[security boolean] : Specifies whether or not to empty the trash securely

But since you muse calls the Finder, I think it will not works.

Now, did you try to remove all QXP instances, empty the Trash and reinstall it ?

Yes, I have used “Empty immediately”, and removed all QXP instances from the several Libraries, put the last version in the trash, checked Activity Monitor for dubious items and restarted. Still I had the warning.

No uninstall application or feature with/withing QXP ?

The old version used to have an uninstall feature. Alas, I deleted it with the old version.
But truly, now that the warning problem has been silenced (i.e. items put in the temp folder), I am no more irked by it.
Thanks for your indefatigable kindness.