Results 1 to 4 of 4

Thread: old RPMs in /var/cache/zypp/packages

  1. #1

    Default old RPMs in /var/cache/zypp/packages

    Looking around for cruft to clean up I found the folder /var/cache/zypp/packages. There are sub-folders under here for each repository set up in YaST and then noarch and x86_64 folders under there. Many of them don't have anything in there, but there are a few random RPMs in some of them. However, the sub-folder repo-oss/suse/x86_64 has about 15 old kernel RPMs. I assume it is safe for me to delete these RPMs? Is there a reason they have been accumulating here?

  2. #2

    Default Re: old RPMs in /var/cache/zypp/packages

    Hi,

    Most probably you have the packages cache enabled on some repos.


    When using yast2 you can check the repos.

    Code:
    yast2 repositories
    alternatively you can check using the command line.

    Code:
    tail -n +1 /etc/zypp/repos.d/*.repo
    The one you're looking for is the line that has the following entry

    Code:
    keeppackages=1
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: old RPMs in /var/cache/zypp/packages

    The command "zypper clean" should clear those out. Removing them manually also works.

    How did they get there? As another user has said, you might have told the system to keep packages. However, I think that's unlikely, or you would have many more of those rpm files.

    At some time in the past (or several times) you may have aborted an update after the packages had been downloaded. For example, you might have seen a problem with "checking file conflicts" and aborted.

    If you later reran that update, you would use packages already downloaded. And, after installing, they would disappear from that cache. But, in some case, by the time you reran the update some of those packages might have been updated again. And in that case, zypper will download the newer version and the uninstalled older version of the package remains in the package cache.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  4. #4

    Default Re: old RPMs in /var/cache/zypp/packages

    Quote Originally Posted by nrickert View Post
    At some time in the past (or several times) you may have aborted an update after the packages had been downloaded. For example, you might have seen a problem with "checking file conflicts" and aborted.

    Ahh, this is sounding familiar. For a while on some updates that ran dracut zypper (or something) would freeze up. I could let it sit for 15 or more minutes and nothing else would happen, so I would end up doing a Ctrl-C to abort those updates and then run zypper again, which would complete the updates. So this makes sense why it is mostly kernel packages in the cache. Eventually this stopped being an issue and there is no "freezing" during updates. I'm guessing this is where the packages came from; I looked in the repository configs and none of them have keeppackages=1.

    I've cleared it out now, thanks for the information!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •