0

I am trying to upgrade my raspberry pi 400 from buster to bullseye. When I run "sudo apt upgrade", I geet error that I don't hav enough space in my /var/cache/apt/archives (i get error from "upgrade"

  • 1153 upgraded, 121 newly installed, 0 to remove and 445 not upgraded. Need to get 1,325 MB of archives. After this operation, 177 MB of additional disk space will be used. E: You don't have enough free space in /var/cache/apt/archives/.

How do I clear space under /var/cache/apt/archives? (it is full of .deb files, some as large as 183964468 bytes)

BTW - I need to install newer apps that don't seem to run under buster

2
  • It is possible (although unsupported) to upgrade from one Raspberry Pi OS version to the next IF YOU DO IT SHORTLY AFTER the new OS is released, although it takes longer than a fresh install and requires some expertise. After 3 years the difficulty increases.
    – Milliways
    Commented Oct 10 at 7:03
  • It sounds like you are trying to do what is sometimes called an in-place upgrade; i.e. upgrading to a later version release starting from the current release. You may be aware that the Raspberry Pi organization recommends performing an upgrade via a new installation.
    – Seamus
    Commented Oct 10 at 22:52

1 Answer 1

1

Please note that the current version of bookworm.

Also, the creators of the Raspberry Pi usually recommend a clean installation if the Debian base system is being updated.

Proofs here

How do I get it?

With a major upgrade, we recommend downloading a new image, reinstalling any applications, and moving your data across from your current image. Debian major version upgrades contain a lot of changes, and it is very easy for some small tweak made somewhere in the system to be incompatible with some change you have made, and you can end up with a broken system and a Raspberry Pi that won' t boot. The easiest way to create a new SD card is with the Raspberry Pi Imager tool available here, or you can download the new image from here and use a tool like Etcher to flash it to a new SD card.

If you really want to try upgrading an existing image, there are some instructions on the forums here – but we don’t support or recommend this, so be warned: you are on your own if anything breaks! Make a backup of your SD card first so you can always go back to a working system if you need to; the SD Card Copier application in Raspberry Pi OS is a good tool for this.

As ever, your feedback on this release is welcome – either add a comment below, or head to our forums.

If you decide to upgrade anyway.

To delete the local package cache.

sudo apt clean

In addition, you can remove unused dependencies that were once automatically installed.

sudo apt autoremove

Also, if the system has been running for several years, it may be useful to vacuum the system log.

Leaving only the last 5 days, for example. You can choose the number of days yourself.

sudo journalctl --vacuum-time=5d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.