openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks » Removing Redundant Stuff From /var/lib/smart/channels

Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Tips, Tricks & Tweaks Tips and Solutions for SUSE Linux
(Please do not post questions here)

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 19-Apr-2008, 20:36
gropiuskalle
Guest
 
Posts: n/a
Default

Ever noticed how big the channel-information in /var/lib/smart/channels can become? Most of the content in this folder is dispensable, since smart does not erase old channel-information, so after a while it can become pretty huge. Of course you could simply erase the entire folder, but then also valid info has to be fetched again, which takes quite a while when using many channels. Here's a simple way to slim down the channel information and get rid of the useless stuff while keeping the stuff smart still needs:

Code:
for i in /var/lib/smart/channels/*xml; do [ -f ${i}.gz ] && rm ${i}; done
Here's an example to show you how well this command works:

Code:
hoppers:~ # du -h /var/lib/smart/channels/
455M****/var/lib/smart/channels/
hoppers:~ # for i in /var/lib/smart/channels/*xml; do [ -f ${i}.gz ] && rm ${i}; done
bash: [: too many arguments
bash: [: too many arguments
bash: [: too many arguments
You may ignore the bash-output, it still works as intended:

Code:
hoppers:~ # du -h /var/lib/smart/channels/
80M**** /var/lib/smart/channels/
Tadaaa!

I know, disk-space is cheap nowadays, yet I think getting rid of unnecessary stuff is always a plus.
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2