Hi list... I want to free up space in my computer clearing yum cache for olders packages, I don't want to use yum clean headers or yum clean packages because I don't want to download any package update again. In my cache I have, the same package but with different version, how I can clean for older versions?
Greetings
______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es
On 12/3/05, yordy ymedians@yahoo.es wrote:
Hi list... I want to free up space in my computer clearing yum cache for olders packages, I don't want to use yum clean headers or yum clean packages because I don't want to download any package update again. In my cache I have, the same package but with different version, how I can clean for older versions?
You really should use yum clean packages. It won't make you download anything again. From the man page for yum(8):
CLEAN OPTIONS The following are the ways which you can invoke yum in clean mode.
yum clean packages Eliminate any cached packages from the system. Note that pack- ages are not automatically deleted after they are downloaded.
This means that it deletes the packages it's downloaded and installed on your machine. It's a cache of what's been downloaded. It won't download them again as they're already installed. Only newer versions will be downloaded.
Using yum clean headers will, however, force you to download all the header files again so if you're looking to avoid downloading things again, then avoid yum clean headers.
As for a direct answer to your question about deleting only older packages from /var/cache/yum/*, you'll need to take care of that by hand.
-- Chris
"`The enemy we fight has no respect for human life or human rights. They don't deserve our sympathy,' he said. `But this isn't about who they are. This is about who we are. These are the values that distinguish us from our enemies.' - Sen. John McCain, R-Arizona
I need to keep the packages that has been downloaded, if I run yum clean packages it will delete all packages in var/cache/yum...
Greetings
--- "Christofer C. Bell" christofer.c.bell@gmail.com escribió:
On 12/3/05, yordy ymedians@yahoo.es wrote:
Hi list... I want to free up space in my computer clearing
yum
cache for olders packages, I don't want to use yum clean headers or yum clean packages because I
don't
want to download any package update again. In my
cache
I have, the same package but with different
version,
how I can clean for older versions?
You really should use yum clean packages. It won't make you download anything again. From the man page for yum(8):
CLEAN OPTIONS The following are the ways which you can invoke yum in clean mode.
yum clean packages Eliminate any cached packages from the
system. Note that pack- ages are not automatically deleted after they are downloaded.
This means that it deletes the packages it's downloaded and installed on your machine. It's a cache of what's been downloaded. It won't download them again as they're already installed. Only newer versions will be downloaded.
Using yum clean headers will, however, force you to download all the header files again so if you're looking to avoid downloading things again, then avoid yum clean headers.
As for a direct answer to your question about deleting only older packages from /var/cache/yum/*, you'll need to take care of that by hand.
-- Chris
"`The enemy we fight has no respect for human life or human rights. They don't deserve our sympathy,' he said. `But this isn't about who they are. This is about who we are. These are the values that distinguish us from our enemies.' - Sen. John McCain, R-Arizona
______________________________________________ Renovamos el Correo Yahoo! 1GB de capacidad, nuevos servicios y más seguridad http://correo.yahoo.es
I need to keep the packages that has been downloaded, if I run yum clean packages it will delete all packages in var/cache/yum...
Greetings
--- "Christofer C. Bell" christofer.c.bell@gmail.com escribió:
On 12/3/05, yordy ymedians@yahoo.es wrote:
Hi list... I want to free up space in my computer clearing
yum
cache for olders packages, I don't want to use yum clean headers or yum clean packages because I
don't
want to download any package update again. In my
cache
I have, the same package but with different
version,
how I can clean for older versions?
You really should use yum clean packages. It won't make you download anything again. From the man page for yum(8):
CLEAN OPTIONS The following are the ways which you can invoke yum in clean mode.
yum clean packages Eliminate any cached packages from the
system. Note that pack- ages are not automatically deleted after they are downloaded.
This means that it deletes the packages it's downloaded and installed on your machine. It's a cache of what's been downloaded. It won't download them again as they're already installed. Only newer versions will be downloaded.
Using yum clean headers will, however, force you to download all the header files again so if you're looking to avoid downloading things again, then avoid yum clean headers.
As for a direct answer to your question about deleting only older packages from /var/cache/yum/*, you'll need to take care of that by hand.
-- Chris
"`The enemy we fight has no respect for human life or human rights. They don't deserve our sympathy,' he said. `But this isn't about who they are. This is about who we are. These are the values that distinguish us from our enemies.' - Sen. John McCain, R-Arizona
______________________________________________ Renovamos el Correo Yahoo! 1GB de capacidad, nuevos servicios y más seguridad http://correo.yahoo.es
On 12/3/05, yordy ymedians@yahoo.es wrote:
I need to keep the packages that has been downloaded, if I run yum clean packages it will delete all packages in var/cache/yum...
You originally said you didn't want to download the same updates again, running "yum clean packages" will not force you to re-download anything later on. If it's in /var/cache/yum/foo/packages it's either a.) already installed and won't be downloaded again or b.) is old and not needed anymore and thus won't be downloaded again. If you want to keep them around for historical purposes, that's fine, but if your intent is to not re-download already installed updates, then "yum clean packages" is fine to use.
Can you elaborate on why you want to keep them around? Perhaps I'm misunderstanding what you're trying to achieve.
-- Chris
"`The enemy we fight has no respect for human life or human rights. They don't deserve our sympathy,' he said. `But this isn't about who they are. This is about who we are. These are the values that distinguish us from our enemies.' - Sen. John McCain, R-Arizona
On 12/3/05, Christofer C. Bell christofer.c.bell@gmail.com wrote:
You really should use yum clean packages. It won't make you download anything again.
...
This means that it deletes the packages it's downloaded and installed on your machine. It's a cache of what's been downloaded. It won't download them again as they're already installed. Only newer versions will be downloaded.
Using yum clean headers will, however, force you to download all the header files again so if you're looking to avoid downloading things again, then avoid yum clean headers.
I am in a similar situation. I use the same yum cache for two machines and am on a very slow link, so I don't ever want to delete the most recent version of a package. I also don't have a lot of extra disk space, so I don't like to keep around multiple versions of every package. I end up manually preening the cache by hand, which is far from ideal. I haven't had the time or bravery to experiment with the built in mechanism for cleaning the cache.
I look forward to anyone who knows some yum-fu to automate this.
On Sat, 2005-12-03 at 13:58, Schlaegel wrote:
This means that it deletes the packages it's downloaded and installed on your machine. It's a cache of what's been downloaded. It won't download them again as they're already installed. Only newer versions will be downloaded.
Using yum clean headers will, however, force you to download all the header files again so if you're looking to avoid downloading things again, then avoid yum clean headers.
I am in a similar situation. I use the same yum cache for two machines and am on a very slow link, so I don't ever want to delete the most recent version of a package. I also don't have a lot of extra disk space, so I don't like to keep around multiple versions of every package. I end up manually preening the cache by hand, which is far from ideal. I haven't had the time or bravery to experiment with the built in mechanism for cleaning the cache.
After you have updated the 2nd machine, a yum clean packages should do the right thing because they will already be installed in both.
Schlaegel wrote:
On 12/3/05, Christofer C. Bell christofer.c.bell@gmail.com wrote:
You really should use yum clean packages. It won't make you download anything again.
...
This means that it deletes the packages it's downloaded and installed on your machine. It's a cache of what's been downloaded. It won't download them again as they're already installed. Only newer versions will be downloaded.
Using yum clean headers will, however, force you to download all the header files again so if you're looking to avoid downloading things again, then avoid yum clean headers.
I am in a similar situation. I use the same yum cache for two machines and am on a very slow link, so I don't ever want to delete the most recent version of a package. I also don't have a lot of extra disk space, so I don't like to keep around multiple versions of every package. I end up manually preening the cache by hand, which is far from ideal. I haven't had the time or bravery to experiment with the built in mechanism for cleaning the cache.
I look forward to anyone who knows some yum-fu to automate this.
The idea to add an automated method to remove older version rpms while keeping all copies of updated packages sounds like an ideal default behavior for yum to follow. Keeping a copy of updated packages from the original disks while pruning the transitional versions would work for me. I know of no current parameter for yum which would accomlish this. If none exists, maybe an RFE filed for yum would get attention to the idea.
Jim
Jim Cornette wrote:
The idea to add an automated method to remove older version rpms while keeping all copies of updated packages sounds like an ideal default behavior for yum to follow. Keeping a copy of updated packages from the original disks while pruning the transitional versions would work for me. I know of no current parameter for yum which would accomlish this. If none exists, maybe an RFE filed for yum would get attention to the idea.
The problem is that yum can't know when it's safe to delete old packages. Unfortunately, not all updates go smoothly: sometimes, if a new version of a package is broken, the best thing to do is to go back to the previous version until a fixed package is out.
If that last version was on the install CD, hopefully you'll be able to install it from the CD. If it was installed through yum, then it would be a pity to want to go back to it only to find yum has just deleted it, especially if the update has broken your network connection.
Having said that, cd /var/cache/yum/updates-released/packages for i in *.rpm ; do rpm -q $(basename $i .rpm) | grep -q "is not installed" && echo $i ; done would appear to list all cached packages that are not installed (that were downloaded from the updates-released repository). Changing "echo" to "rm" should delete all updates that are no longer installed.
You can change the cd line as appropriate to clear out other repositories.
If you're scripting this, the cd line should be cd /var/cache/yum/updates-released/packages || exit so that you make sure you're in the right directory before you start deleting files.
Hope this helps,
James.
for example... I found a command "repomanage --old path" in yum-utils that print the the older packages. any tool to delete exists?
Greetings
______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es
finally I write a perl script to do that I want... I run repomanage -old repo > old_packages; pass old_packages as parameter to my script that delete all files in old_packages.
replace .rpm by .hdr in old_packages and pass it to my script again...
Greetings
______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es