Skip to content

When running rustup update and a component fails to download, already downloaded component are redownloaded on subsequent run. #4100

Closed as duplicate

Description

@dzamlo

Problem you are trying to solve

When running rustup update and a component fails to download, already downloaded component are redownloaded on subsequent run.

Step to reproduce:

  1. Have multiple component to updates
  2. Run rustup update
  3. Have at least one component successfully download
  4. Have a component failed to download, for example by disconnecting your internet connection
  5. Rerun rustup update
  6. The component that was successfully downloaded is downloaded again

Solution you'd like

When a component is downloaded and another component failed to download, the component that was successfully downloaded should not need to be redownloaded again.

This would be useful for person like me that have a bad internet connection and a lot of targets (and thus components) installed.

Notes

No response

Activity

  1. rami3l commented on Nov 26, 2024

    @rami3l
    Member

    @dzamlo Thanks for filing this issue!

    I believe this is already implemented, for instance when I intentionally interrupt my upgrade process, you can see that it is picking up the previous work automatically:

    > rustup update
    info: syncing channel updates for 'stable-aarch64-apple-darwin'
    818.4 KiB / 818.4 KiB (100 %) 207.4 KiB/s in  3s         
    info: latest update on 2024-10-17, rust version 1.82.0 (f6e511eec 2024-10-15)
    info: syncing channel updates for 'nightly-aarch64-apple-darwin'
    845.8 KiB / 845.8 KiB (100 %) 326.1 KiB/s in  2s         
    info: latest update on 2024-11-26, rust version 1.85.0-nightly (7db7489f9 2024-11-25)
    info: downloading component 'miri'
      1.4 MiB /   1.4 MiB (100 %) 316.0 KiB/s in  3s         
    info: downloading component 'rust-src'
    ^C⏎
    > rustup update
    info: syncing channel updates for 'stable-aarch64-apple-darwin'
    info: latest update on 2024-10-17, rust version 1.82.0 (f6e511eec 2024-10-15)
    info: syncing channel updates for 'nightly-aarch64-apple-darwin'
    845.8 KiB / 845.8 KiB (100 %) 366.8 KiB/s in  3s         
    info: latest update on 2024-11-26, rust version 1.85.0-nightly (7db7489f9 2024-11-25)
    info: downloading component 'miri'
    info: downloading component 'rust-src'
      2.9 MiB /   2.9 MiB (100 %) 563.7 KiB/s in  6s         
    info: downloading component 'cargo'
    ^C⏎ 
    > rustup update
    info: syncing channel updates for 'stable-aarch64-apple-darwin'
    info: latest update on 2024-10-17, rust version 1.82.0 (f6e511eec 2024-10-15)
    info: syncing channel updates for 'nightly-aarch64-apple-darwin'
    info: latest update on 2024-11-26, rust version 1.85.0-nightly (7db7489f9 2024-11-25)
    info: downloading component 'miri'
    info: downloading component 'rust-src'
    info: downloading component 'cargo'
      6.9 MiB /   6.9 MiB (100 %)   5.2 MiB/s in  1s         
    info: downloading component 'clippy'
    info: downloading component 'rust-docs'
     16.6 MiB /  16.6 MiB (100 %)   9.6 MiB/s in  1s         
    info: downloading component 'rust-std'
     24.2 MiB /  24.2 MiB (100 %)  10.5 MiB/s in  2s         
    info: downloading component 'rustc'
     54.6 MiB /  54.6 MiB (100 %)  11.4 MiB/s in  5s         
    info: downloading component 'rustfmt'
    ^C⏎ 

    May I ask under what circumstances you believe this feature is not working as intended?

  2. rami3l commented on Nov 29, 2024

    @rami3l
    Member

    Partially related: #3776

  3. MaximumWaffle commented on Feb 15, 2026

    @MaximumWaffle

    Interrupting rustup update with ctrl+c doesn't cause any problems. The problem is that when one component fails to download, rustup says "cleaning up downloads & tmp directories" and then removes everything that it successfully downloaded. Here's a typical experience for me when updating rust:

    > rustup update
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2026-02-15, rust version 1.95.0-nightly (a33907a7a 2026-02-14)
    info: downloading component 'clippy'
    info: downloading component 'llvm-tools'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
     37.4 MiB /  37.4 MiB (100 %)   9.1 MiB/s in  4s
    info: downloading component 'rust-src'
    info: downloading component 'rust-std' for 'aarch64-unknown-none-softfloat'
     12.6 MiB /  12.6 MiB (100 %)   8.1 MiB/s in  1s
    info: downloading component 'rustfmt'
    info: downloading component 'cargo'
     10.5 MiB /  10.5 MiB (100 %)   8.1 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imac-unknown-none-elf'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imac-unknown-none-elf.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imac-unknown-none-elf.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imac-unknown-none-elf.tar.xz'
     11.3 MiB /  11.3 MiB (100 %)   8.1 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imafc-unknown-none-elf'
     11.3 MiB /  11.3 MiB (100 %)   6.0 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imc-unknown-none-elf'
     11.1 MiB /  11.1 MiB (100 %)   9.2 MiB/s in  1s
    info: downloading component 'rust-std'
     28.3 MiB /  28.3 MiB (100 %)  10.4 MiB/s in  2s
    info: downloading component 'rustc'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz'
      7.4 MiB /  76.4 MiB ( 10 %)   3.1 MiB/s in  2s ETA: 22s
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz'
    error: component download failed for rustc-x86_64-unknown-linux-gnu
    info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
    
           stable-x86_64-unknown-linux-gnu unchanged - rustc 1.93.1 (01f6ddf75 2026-02-11)
      nightly-x86_64-unknown-linux-gnu update failed - rustc 1.95.0-nightly (47611e160 2026-02-12)
             1.90-x86_64-unknown-linux-gnu unchanged - rustc 1.90.0 (1159e78c4 2025-09-14)
    
    info: cleaning up downloads & tmp directories
    info: self-update is disabled for this build of rustup
    info: any updates to rustup will need to be fetched with your system package manager
    
    > rustup update
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2026-02-15, rust version 1.95.0-nightly (a33907a7a 2026-02-14)
    info: downloading component 'clippy'
    info: downloading component 'llvm-tools'
     37.4 MiB /  37.4 MiB (100 %)   8.8 MiB/s in  4s
    info: downloading component 'rust-src'
    info: downloading component 'rust-std' for 'aarch64-unknown-none-softfloat'
      8.1 MiB /  12.6 MiB ( 64 %)   7.9 MiB/s in  1s
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-aarch64-unknown-none-softfloat.tar.xz'
     12.6 MiB /  12.6 MiB (100 %)   8.1 MiB/s in  1s
    info: downloading component 'rustfmt'
    info: downloading component 'cargo'
     10.5 MiB /  10.5 MiB (100 %)   8.4 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imac-unknown-none-elf'
     10.7 MiB /  11.3 MiB ( 95 %)   7.9 MiB/s in  1s
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imac-unknown-none-elf.tar.xz'
     11.3 MiB /  11.3 MiB (100 %)   7.7 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imafc-unknown-none-elf'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imafc-unknown-none-elf.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imafc-unknown-none-elf.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imafc-unknown-none-elf.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imafc-unknown-none-elf.tar.xz'
    error: component download failed for rust-std-riscv32imafc-unknown-none-elf
    info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
    
           stable-x86_64-unknown-linux-gnu unchanged - rustc 1.93.1 (01f6ddf75 2026-02-11)
      nightly-x86_64-unknown-linux-gnu update failed - rustc 1.95.0-nightly (47611e160 2026-02-12)
             1.90-x86_64-unknown-linux-gnu unchanged - rustc 1.90.0 (1159e78c4 2025-09-14)
    
    info: cleaning up downloads & tmp directories
    info: self-update is disabled for this build of rustup
    info: any updates to rustup will need to be fetched with your system package manager
    
    > rustup update
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2026-02-15, rust version 1.95.0-nightly (a33907a7a 2026-02-14)
    info: downloading component 'clippy'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/clippy-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/clippy-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: downloading component 'llvm-tools'
     11.4 MiB /  37.4 MiB ( 31 %)   9.1 MiB/s in  1s ETA:  2s
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
     13.4 MiB /  37.4 MiB ( 36 %)   8.2 MiB/s in  1s ETA:  2s
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    error: component download failed for llvm-tools-x86_64-unknown-linux-gnu
    info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
    
           stable-x86_64-unknown-linux-gnu unchanged - rustc 1.93.1 (01f6ddf75 2026-02-11)
      nightly-x86_64-unknown-linux-gnu update failed - rustc 1.95.0-nightly (47611e160 2026-02-12)
             1.90-x86_64-unknown-linux-gnu unchanged - rustc 1.90.0 (1159e78c4 2025-09-14)
    
    info: cleaning up downloads & tmp directories
    info: self-update is disabled for this build of rustup
    info: any updates to rustup will need to be fetched with your system package manager
    
    > rustup update
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2026-02-15, rust version 1.95.0-nightly (a33907a7a 2026-02-14)
    info: downloading component 'clippy'
    info: downloading component 'llvm-tools'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
     24.9 MiB /  37.4 MiB ( 67 %)   8.4 MiB/s in  3s ETA:  1s
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    error: component download failed for llvm-tools-x86_64-unknown-linux-gnu
    info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
    
           stable-x86_64-unknown-linux-gnu unchanged - rustc 1.93.1 (01f6ddf75 2026-02-11)
      nightly-x86_64-unknown-linux-gnu update failed - rustc 1.95.0-nightly (47611e160 2026-02-12)
             1.90-x86_64-unknown-linux-gnu unchanged - rustc 1.90.0 (1159e78c4 2025-09-14)
    
    info: cleaning up downloads & tmp directories
    info: self-update is disabled for this build of rustup
    info: any updates to rustup will need to be fetched with your system package manager
    
    > rustup update
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2026-02-15, rust version 1.95.0-nightly (a33907a7a 2026-02-14)
    info: downloading component 'clippy'
    info: downloading component 'llvm-tools'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
     27.6 MiB /  37.4 MiB ( 74 %)  10.0 MiB/s in  3s
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz'
    error: component download failed for llvm-tools-x86_64-unknown-linux-gnu
    info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
    
           stable-x86_64-unknown-linux-gnu unchanged - rustc 1.93.1 (01f6ddf75 2026-02-11)
      nightly-x86_64-unknown-linux-gnu update failed - rustc 1.95.0-nightly (47611e160 2026-02-12)
             1.90-x86_64-unknown-linux-gnu unchanged - rustc 1.90.0 (1159e78c4 2025-09-14)
    
    info: cleaning up downloads & tmp directories
    info: self-update is disabled for this build of rustup
    info: any updates to rustup will need to be fetched with your system package manager
    
    > rustup update
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2026-02-15, rust version 1.95.0-nightly (a33907a7a 2026-02-14)
    info: downloading component 'clippy'
    info: downloading component 'llvm-tools'
     37.4 MiB /  37.4 MiB (100 %)  10.0 MiB/s in  3s
    info: downloading component 'rust-src'
    info: downloading component 'rust-std' for 'aarch64-unknown-none-softfloat'
     12.6 MiB /  12.6 MiB (100 %)   7.3 MiB/s in  1s
    info: downloading component 'rustfmt'
    info: downloading component 'cargo'
     10.5 MiB /  10.5 MiB (100 %)   9.4 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imac-unknown-none-elf'
    info: retrying download for 'https://static.rust-lang.org/dist/2026-02-15/rust-std-nightly-riscv32imac-unknown-none-elf.tar.xz'
     11.3 MiB /  11.3 MiB (100 %)   8.1 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imafc-unknown-none-elf'
     11.3 MiB /  11.3 MiB (100 %)   8.0 MiB/s in  1s
    info: downloading component 'rust-std' for 'riscv32imc-unknown-none-elf'
     11.1 MiB /  11.1 MiB (100 %)   9.4 MiB/s in  1s
    info: downloading component 'rust-std'
     28.3 MiB /  28.3 MiB (100 %)   7.5 MiB/s in  3s
    info: downloading component 'rustc'
     76.4 MiB /  76.4 MiB (100 %)  10.3 MiB/s in  8s
    info: removing previous version of component 'clippy'
    info: removing previous version of component 'llvm-tools'
    info: removing previous version of component 'rust-src'
    info: removing previous version of component 'rust-std' for 'aarch64-unknown-none-softfloat'
    info: removing previous version of component 'rustfmt'
    info: removing previous version of component 'cargo'
    info: removing previous version of component 'rust-std' for 'riscv32imac-unknown-none-elf'
    info: removing previous version of component 'rust-std' for 'riscv32imafc-unknown-none-elf'
    info: removing previous version of component 'rust-std' for 'riscv32imc-unknown-none-elf'
    info: removing previous version of component 'rust-std'
    info: removing previous version of component 'rustc'
    info: installing component 'clippy'
    info: installing component 'llvm-tools'
     37.4 MiB /  37.4 MiB (100 %)  36.2 MiB/s in  1s
    info: installing component 'rust-src'
    info: installing component 'rust-std' for 'aarch64-unknown-none-softfloat'
    info: installing component 'rustfmt'
    info: installing component 'cargo'
    info: installing component 'rust-std' for 'riscv32imac-unknown-none-elf'
    info: installing component 'rust-std' for 'riscv32imafc-unknown-none-elf'
    info: installing component 'rust-std' for 'riscv32imc-unknown-none-elf'
    info: installing component 'rust-std'
    info: installing component 'rustc'
     76.4 MiB /  76.4 MiB (100 %)  37.5 MiB/s in  2s
    info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
    
      stable-x86_64-unknown-linux-gnu unchanged - rustc 1.93.1 (01f6ddf75 2026-02-11)
       nightly-x86_64-unknown-linux-gnu updated - rustc 1.95.0-nightly (a33907a7a 2026-02-14) (from rustc 1.95.0-nightly (47611e160 2026-02-12))
        1.90-x86_64-unknown-linux-gnu unchanged - rustc 1.90.0 (1159e78c4 2025-09-14)
    
    info: cleaning up downloads & tmp directories
    info: self-update is disabled for this build of rustup
    info: any updates to rustup will need to be fetched with your system package manager
    >
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions