TransWikia.com

Can we clean yum cache files manually?

Super User Asked on November 7, 2020

I am using Redhat 7 while running yum update I am getting Bus error (core dumped) error.

After troubleshooting I found that / was full because of /var/cache/yum/x86_64/7server/rhel-x86_64-server-7/gen folder.

Inside this folder below files contains GB of data.

enter image description here

I tried yum clean all command to clean up the space but it is not working.

Can I manually delete these files?

Manual delete will cause any problem to yum ?

2 Answers

After successful installation, packages should be deleted from the yum cache. You should check in the file /etc/yum.conf, whether the keepcache setting is 1 instead of 0.

The RedHat post Maybe you want: rm -rf /var/cache/yum says that the command yum clean all gives the impression that enabled and disabled/removed repos are cleaned but in reality, performs only these tasks:

  • clean all cache from enabled repos
  • remove all data from unknown repos
  • preserve cache of disabled/removed repos

The fix in RHBA-2017:2295 should have added a reminder for this command saying:

Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos

In any case, whatever your situation, you can issue the recommended command:

rm -rf /var/cache/yum

Correct answer by harrymc on November 7, 2020

Manual deletion is quite safe and will not cause problems with yum. This is fine:

rm -rf /var/cache/yum

You can also check this post on other steps that may help in clearing disk space.

Answered by Danila Vershinin on November 7, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP