I ran rustup update to update my Rust toolchain, but the command would not finish.

$ rustup update
info: syncing channel updates for stable-aarch64-apple-darwin
info: latest update on 2026-11-12 for version 1.100.0 (0ef1bc386 2026-11-09)

  stable-aarch64-apple-darwin unchanged - rustc 1.100.0 (0ef1bc386 2026-11-09)

info: checking for self-update (current version: 1.29.3)
info: cleaning up downloads & tmp directories

Nothing appeared to progress beyond cleaning up downloads & tmp directories. Rust itself was already current, and the final cleanup seemed to be taking the time. After waiting several minutes, I investigated what it was doing.

Environment

ItemValue
OSmacOS 26.5.1
CPUApple Silicon (ARM64)
Rust1.100.0
rustup1.29.3

This is a record of observations in that environment. I did not run comparative experiments with different filesystems or monitoring software.

Inspecting the stack with sample

First, I checked whether execution had stopped completely. I used macOS’s sample command to sample the running process’s stack for five seconds.

sudo sample $(pgrep -x rustup | head -1) 5

This selects the first process with the matching name, so the target PID needs checking if multiple rustup processes are running. The following stack is excerpted and organized for readability.

rustup::cli::rustup_mode::update
  └─ rustup::utils::delete_dir_contents_following_links
      └─ remove_dir_contents_recursive
          └─ scan_and_remove_entry_recursively
              └─ remove_dir_contents_recursive
                  └─ scan_and_remove_entry_recursively
                      └─ ...
                          └─ fs_at::unix::OpenOptionsImpl::open_dir_at
                              └─ openat
                                  └─ __openat

The process appeared to be recursively deleting directories beneath delete_dir_contents_following_links. The sample summary included:

Sort by top of stack, same collapsed (when >= 5):
    __psynch_cvwait       63090
    __workq_kernreturn    4206
    kevent                4206
    __openat              4136
    __unlinkat              64

Of the main thread’s 4,206 samples, 4,136 were in __openat. Within the sampled interval, the main thread spent most of its time opening filesystem entries.

The aggregate summary also includes waits in other threads. Those totals cannot be mixed with the main thread’s sample count to calculate a percentage. Sample counts are not syscall invocation counts either: one long-running invocation can be sampled repeatedly.

This established that deletion was underway, but did not yet distinguish stalled execution from gradual processing of many files.

Inspecting filesystem operations with fs_usage

Next, I used fs_usage to see which files rustup was accessing.

sudo fs_usage -w -f filesystem $(pgrep -x rustup | head -1)

The output was extensive. Here are excerpts showing filenames and durations:

openat    [28]/fn.svminp_u32_x.html    0.017511
fstat64   F=30                         0.000002
close     F=30                         0.000011
unlinkat  [28]/fn.svminp_u32_x.html    0.000203

openat    [28]/fn.vqmovunh_s16.html    0.027984
fstat64   F=30                         0.000002
close     F=30                         0.000015
unlinkat  [28]/fn.vqmovunh_s16.html    0.000687

openat    [28]/fn.svshrnb_n_u64.html   0.034074
fstat64   F=30                         0.000002
close     F=30                         0.000019
unlinkat  [28]/fn.svshrnb_n_u64.html   0.000339

The filenames suggest Rust documentation, particularly HTML for ARM SIMD intrinsics. This is an inference from filenames: I did not resolve every relative path in the output to an absolute path.

System callApproximate observed duration
openat10–40ms
fstat640.002ms
close0.01–0.02ms
unlinkat0.2–0.7ms

In these observations, opening with openat took much longer than deleting with unlinkat. These are approximate durations seen in the log, rather than means or percentiles over all calls. If this continued across tens of thousands of files, a long wait would be understandable. I did not measure the total file count, however, so I cannot use that assumption to estimate completion time.

At least filesystem operations were continuing. The process did not appear to have stopped completely.

Changes in temporary-directory size

I inspected rustup’s directories. In the logs below, the home directory is shown as ~ and temporary-directory names are replaced with placeholders.

$ du -sh ~/.rustup
4.6G    ~/.rustup

$ du -sh ~/.rustup/toolchains/*
1.2G    ~/.rustup/toolchains/1.88.0-aarch64-apple-darwin
610M    ~/.rustup/toolchains/1.98.1-aarch64-apple-darwin
573M    ~/.rustup/toolchains/nightly-2026-02-12-aarch64-apple-darwin
1.5G    ~/.rustup/toolchains/stable-aarch64-apple-darwin

Adding the displayed sizes gives approximately 3.9GB for toolchains. The downloads and temporary directories showed 724MB remaining in tmp.

$ du -sh ~/.rustup/tmp ~/.rustup/downloads
724M    ~/.rustup/tmp
  0B    ~/.rustup/downloads
[22:27:14]

After waiting a while, I checked again.

$ du -sh ~/.rustup/tmp
714M    ~/.rustup/tmp
[22:27:37]

The size was decreasing. The timestamps recorded after the outputs were 22:27:14 and 22:27:37, a difference of 23 seconds. The displayed value fell from 724M to 714M, approximately 10M, across these observations. Together with the fs_usage output, this suggests that deletion was progressing. However, du -sh rounds its output and each command takes time to run, so this is not a precise deletion-rate measurement.

At another point, I inspected individual temporary directories.

$ du -sh ~/.rustup/tmp/*_dir
  0B    ~/.rustup/tmp/example-empty_dir
583M    ~/.rustup/tmp/example-target_dir

Many files remained in example-target_dir. The HTML files might have been inside it, but that connection was not established. The 724MB, 714MB, and 583MB readings came from different times or scopes and should not be treated as a breakdown from one instant.

Manual deletion after stopping rustup

At this point, I wondered whether ordinary rm -rf would be faster.

I interrupted rustup update, confirmed that rustup was no longer running, and removed the target temporary directory. The path below represents the directory removed in this incident using a placeholder name, rather than a general command to copy into another environment. The actual target must be checked at the time.

$ time rm -rf ~/.rustup/tmp/example-target_dir

real    0m6.739s
user    0m0.021s
sys     0m3.683s

6.739 seconds. Removing the temporary directory I had been waiting on finished in under seven seconds. I did wish I had tried it sooner.

However, rustup had already removed part of the contents before interruption; rm handled the remainder. This was not a controlled comparison starting from identical file sets and states. It does not support calculating how many times faster rm was.

Deleting temporary files used by a running rustup process could break its operation, so I stopped it before doing this. I did not manually remove the toolchain directories themselves.

Relation to the rustup 1.29.3 implementation

While preparing this article, I checked the update implementation in rustup 1.29.3. After channel updates and self-update, it prints the observed message and invokes downloads cleanup and the temporary context’s clean() method.

The temporary-directory cleanup also calls delete_dir_contents_following_links. This function uses remove_dir_all::RemoveDir to delete the contents of an opened directory. The version’s Cargo.lock records remove_dir_all 1.0.0 and fs_at 0.2.1. This agrees with the function names observed in the sample.

A related change, PR #4618, changes failure handling in this cleanup function from a panic to a warning. It is not a fix for the observed delay, and I have no evidence that it caused this incident.

This checks the correspondence between the observed stack and the cleanup call path. I did not reproduce this environment’s delay by exercising every branch or test of the deletion library.

Interpreting the timing difference and remaining questions

The observations establish that openat appeared repeatedly during rustup’s recursive deletion and took substantial time, that filesystem deletion and size reduction continued, and that rm -rf removed the remaining temporary directory in 6.739 seconds.

rustup and macOS’s rm use different deletion implementations, which could contribute to the difference. However, I did not trace rm’s syscalls, and the file counts and contents were not matched. The deletion algorithm alone cannot be identified as the cause.

Filesystem behavior, security mechanisms, access monitoring, and cache state are also possible factors, but none was isolated. This investigation does not establish a particular monitoring tool or macOS defect as the cause.

The delay was in temporary-directory deletion after update checking, rather than compilation or downloading Rust itself. Establishing that much already provided a basis for doing something other than waiting.

A next investigation would prepare matching directory structures and compare syscalls and processed entry counts for rustup’s deletion path and rm. This record locates the slow operation; it does not establish the underlying cause or validate a fix.