[SOLVED] Script to clear all but the current packages from cache?

Has anyone written, found such a script, or like to write one?
It just has to delete all older duplicate packages in /var/cache/pacman/pkg/ .  After which keeping a superseded copy of packages just comes down to when you use the script.
It would keep the /var/cache/pacman/pkg/ directory slimmer, (though it would still have more than is required in it I know) & ensure a quick recovery through downgrading to a known good package when required.
It would be so easy to run the script before an -Syu --aur  so that if you have any problems you still have the superseded version of whatever, that you can downgrade to until the problem is solved
Last edited by handy (2008-12-18 07:37:10)

man pacman wrote:
SYNC OPTIONS
       -c, --clean
           Remove packages that are no longer installed from the cache as well
           as currently unused sync databases to free up disk space. When
           pacman downloads packages, it saves them in a cache directory. In
           addition, databases are saved for every sync DB you download from,
           and are not deleted even if they are removed from the configuration
           file pacman.conf(5). Use one --clean switch to only remove packages
           that are no longer installed; use two to remove all packages from
           the cache. In both cases, you will have a yes or no option to
           remove packages and/or unused downloaded databases.
           If you use a network shared cache, see the CleanMethod option in
           pacman.conf(5).
Does "pacman -Sc" not do what you are suggesting?

Similar Messages

  • I bought a new laptop (Macbook) but the current installation files I have of Photoshop Elements 12 is for Windows, how can I change this? Or do I have to purchase an all new photoshopset?

    Can anyone help me with this question?
    I bought a new laptop (Macbook) but the current installation files I have of Photoshop Elements 12 is for Windows, how can I change this? Or do I have to purchase an all new photoshopset? I hope not because that would be really expensive.

    Really? That's extremely unusual. Have you looked at all the discs? In any case you can download the mac version here:
    Download Photoshop Elements products | 12, 11, 10

  • How do I clear all of the java applets that have been downloaded?

    I migrated firefox and other applications to my new mac so that I would not to reenter all of my passwords saved by firefox. However, it appears that the java applets were also transfered and one of these applets does not work with the new intel mac. I was able to get the same applet to work in safari, and I was able to delete the applet from safari as well, but was unable to do so in firefox.
    So, how do I clear all of the previously downloaded applets, or even better, just the one I want to? Clearing all of the recent history didn't work.
    Here is the site:
    http://www.mdbg.net/chindict/chindict.php
    == This happened ==
    A few times a week

    I did that already, and it cleared the applets for Safari, but not for Firefox.

  • Shortcut to close window in Safari but the current?

    I've been searching all over for this. I'm sure it s obvious ,but the words that I search are so common ,I get way to much info. Anyway I want to know how I can close all safari window but the currently active. Lets say there is 5 windows or tabs open but I'm only interested in the one I'm using now. I think I remember there being one ,if not I think U can make your own. Any help would be greatly appreciated.

    752/3198
    Hi Jason,
    Using the Close All Windows (⌥⌘W) shortcut does not affect minimized windows, so,
    hit first the Minimize shortcut (⌘M)
    to put your window in the Dock,
    then Close All Windows.
    The only window(s) left will be the one(s) in the Dock.
    HTH
    Axl

  • Can I remove all but the last "Mac OS X Server certificate management" application password from my System Keychain?

    I am slowly nursing a broken Montain Lion Server back to health. The problems started with a name change days ago then went sour, probably because of some stuff in the keychain that tripped the commands up.
    I have now a trusted Root CA in my System Keychain which has signed my wildcard Certificate for my domain and all my services are protected by this wildcard certificate. Creating and installing that certificate helped me back (slowly) but there are still problems to solve
    I also have set the com.apple.servermgrd identity preference to this (now trusted) wildcard certificate a few minutes ago
    I am busy cleaning as much as possibe of junk from my Keychains to improve stability, of course without damaging things (I hope)
    There are 19 "Mac OS X Server certificate management" application passwords in my System Keychain.
    12 are from 9 days ago when I installed this clean OS X Mountain Lion Server for the first time, created within a minute during server install.
    1 from 6 minutes later, maybe when I turned on a Service
    2 are from that day, but 2 and 3 hours later (also probably because of something I did in Server.app, like enabling a service)
    1 from 2 days later (probably when I tried to change the server name/domain)
    1 from again 5 days later (probably when I tried to change the server name/domain again)
    1 from yesterday, when I changed the servername
    1 from today, when I changed the server name again.
    What are these application passwords for and can I safely remove all but the last one? What are they for?

    I went ahead and remove them a month ago. So far, there don't seem to be any issues. As long as you double-triple-check that the hash-number in those "Mac OS X Server certificate management" keychains _aren't_ in the filename of any of the *.pem files in the /etc/certificates folder, you can delete those orphan keychains.

  • If I were to buy the 7 Home Premium SP1 64bit, System Builder OEM DVD 1 Pack from Amazon to install Microsoft Windows 7 on my Mac, would it be compatible with my computer when I put it in bootcamp? (I have all of the current software updates)

    If I were to buy the 7 Home Premium SP1 64bit, System Builder OEM DVD 1 Pack from Amazon to install Microsoft Windows 7 on my Macbook Pro, would it be compatible with my computer if I put it in bootcamp? (I have all of the current software updates)

    In order to run Windows Applications, you must own the applications and, since they require Windows, you must own Windows. There are technologies like wine that will allow Windows applications to run without Windows, but they tend to be flakey at best.

  • Out of Bounds effect has all but the frames tool grayed out?

    What do I do when the Out of Bounds effect has all but the frames tool grayed out?

    Hi 123fay,
    To use Selection tool in 'Out of Bounds' guided, you need to click on Selection Tool tab in order to select it. It will turn dark grey (symbol of selection) on selection. Now you will be able to select. Please try again and let me know if this solves the problem.
    Thanks,
    Nikita

  • I recently ran monolingual and removed all but the intel-64 bit architectures.  Now my iphoto will not open.  Here's the message  that I get. Process:         iPhoto [3543] Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto Identifier:

    I recently ran monolingual and removed all but the intel-64 bit architectures.  Now my iphoto (along with Idvd, garage band, imovie) will not open.  Here is the message that I get.
    Process:         iPhoto [3543]
    Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto
    Identifier:      com.apple.iPhoto
    Version:         ??? (???)
    Build Info:      iPhotoProject-4750000~1
    Code Type:       X86 (Native)
    Parent Process:  launchd [109]
    Date/Time:       2011-06-10 21:48:59.821 -0500
    OS Version:      Mac OS X 10.6.7 (10J869)
    Report Version:  6
    Interval Since Last Report:          -4164908 sec
    Crashes Since Last Report:           8
    Per-App Crashes Since Last Report:   11
    Anonymous UUID:                      45357CCD-011B-482E-A2EA-CF42096F1321
    Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Crashed Thread:  0
    Dyld Error Message:
      Library not loaded: /Library/Frameworks/iLifeSlideshow.framework/Versions/A/iLifeSlideshow
      Referenced from: /Applications/iPhoto.app/Contents/MacOS/iPhoto
      Reason: no suitable image found.  Did find:
              /Library/Frameworks/iLifeSlideshow.framework/Versions/A/iLifeSlideshow: mach-o, but wrong architecture
              /Library/Frameworks/iLifeSlideshow.framework/Versions/A/iLifeSlideshow: mach-o, but wrong architecture
    Binary Images:
    0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <1C06ECD9-A2D7-BB10-AF50-0F2B598A7DEC> /usr/lib/dyld
    Model: iMac10,1, BootROM IM101.00CC.B00, 2 processors, Intel Core 2 Duo, 3.06 GHz, 4 GB, SMC 1.53f13
    Graphics: ATI Radeon HD 4670, ATI Radeon HD 4670, PCIe, 256 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x8F), Atheros 9280: 2.1.14.5
    Bluetooth: Version 2.4.0f1, 2 service, 19 devices, 1 incoming serial ports
    Network Service: Built-in Ethernet, Ethernet, en0
    Serial ATA Device: ST31000528ASQ, 931.51 GB
    Serial ATA Device: OPTIARC DVD RW AD-5680H
    USB Device: USB2.0 Hub, 0x05e3  (Genesys Logic, Inc.), 0x0608, 0x24300000
    USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8502, 0x24400000
    USB Device: External HDD, 0x1058  (Western Digital Technologies, Inc.), 0x0901, 0x26400000
    USB Device: Internal Memory Card Reader, 0x05ac  (Apple Inc.), 0x8403, 0x26500000
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x04500000
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x06100000
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8215, 0x06110000

    Please let me know when you find a fix. I did the same thing and have tried every suggestion I can find online. The message I get is...
    Process:         iPhoto [4991]
    Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto
    Identifier:      com.apple.iPhoto
    Version:         ??? (???)
    Build Info:      iPhotoProject-6070000~1
    Code Type:       X86 (Native)
    Parent Process:  launchd [142]
    Date/Time:       2011-06-13 23:39:38.485 +1200
    OS Version:      Mac OS X 10.6.7 (10J869)
    Report Version:  6
    Interval Since Last Report:          -1643976 sec
    Crashes Since Last Report:           35
    Per-App Crashes Since Last Report:   12
    Anonymous UUID:                      D4811036-EA8D-479D-8D9F-11E2FC8F6D4C
    Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Crashed Thread:  0
    Dyld Error Message:
      Library not loaded: /Library/Frameworks/iLifeSlideshow.framework/Versions/A/iLifeSlideshow
      Referenced from: /Applications/iPhoto.app/Contents/MacOS/iPhoto
      Reason: no suitable image found.  Did find:
              /Library/Frameworks/iLifeSlideshow.framework/Versions/A/iLifeSlideshow: mach-o, but wrong architecture
              /Library/Frameworks/iLifeSlideshow.framework/Versions/A/iLifeSlideshow: mach-o, but wrong architecture
    Binary Images:
    0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <1C06ECD9-A2D7-BB10-AF50-0F2B598A7DEC> /usr/lib/dyld
    Model: MacBookPro7,1, BootROM MBP71.0039.B0B, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.62f6
    Graphics: NVIDIA GeForce 320M, NVIDIA GeForce 320M, PCI, 256 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.10.131.36.9)
    Bluetooth: Version 2.4.0f1, 2 service, 19 devices, 1 incoming serial ports
    Network Service: AirPort, AirPort, en1
    Serial ATA Device: Hitachi HTS545025B9SA02, 232.89 GB
    Serial ATA Device: MATSHITADVD-R   UJ-898, 3.5 GB
    USB Device: Internal Memory Card Reader, 0x05ac  (Apple Inc.), 0x8403, 0x26100000
    USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8507, 0x24600000
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x06600000
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8213, 0x06610000
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x06500000
    USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x0236, 0x06300000
    I have reinstalled Mac OSX 10.6.3 and done the updates from there.
    I have reinstalled ilife 11 from disk and done the updates.
    I have deleted all the suggested files and then redone install and updates.
    I have tried just reinstalling iphoto and doing updates.
    Is there any way to get a replacement -  /Library/Frameworks/iLifeSlideshow.framework/Versions/A/iLifeSlideshow
    file with the right architecture?

  • How can i clear all of the songs off my ipod so i can start a fresh!!

    Hi everyone out there,
    im desperately seeking for somebody who knows how i can clear all of the songs off my mini ipod so that i can start a fresh in intunes to upload new songs. ive misplaced my handbook somewhere so if anyone is able to help me i would be very grateful. thank you GB24

    my ipod picks and chooses when i connect whether its going to update or not,
    In Auto, it updates every time you connect it.
    If you do not change anything it iTunes, the update will take only a second because there was nothing changed to update.

  • My video i have successfully worked on for seven days now won't open at all.  It says there is no sequence of this type found... But in the very bottom bar I can see the whole project load.  But the only option from the error screen is exit out of Premier

    My video i have successfully worked on for seven days now won't open at all.  It says there is no sequence of this type found... But in the very bottom bar I can see the whole project load.  But the only option from the error screen is exit out of Premiere Pro CC.  I am on a PC withe Windows 8.1 and apps are up to date.  Thanks much for any help!!

    Hi Bryan,
    My video i have successfully worked on for seven days now won't open at all.  It says there is no sequence of this type found... But in the very bottom bar I can see the whole project load.  But the only option from the error screen is exit out of Premiere Pro CC.  I am on a PC withe Windows 8.1 and apps are up to date.  Thanks much for any help!!
    Sounds like an activation issue. Quite Premiere Pro. Sign out of Creative Cloud. Restart Premiere Pro. Sign back in: http://bit.ly/CC-sign-out
    Hope that works for you.
    Kevin

  • How can I clean a mailbox and remove all but the latest message in thread, and more...

    I am using Thunderbird version 24.6.0, for years I have been saving every email into a mailbox folder of a technical email alias I subscribe to.
    The folder now has over 12,000 emails and I am exceeding 700 MB. Is there an Addon or tool of any kind that allows me to automatically in one fell swoop delete all but the last message in a thread assuming all prior messages included all prior messages in thread, BUT here's the hitch, if someone responded out of order to a thread or did not include prior messages, their message should be saved since it will not appear in the prior string of messages.
    I can draw it out better than explain it, I want to save all responses to a thread, except those that are captured by the final message in a thread, or....
    | Re:- topic1 a. don't save because all included in "c"
    |- Re: topic1 b. don't save because all included in "c"
    |- Re:topic1 c. save
    | Re:- topic1 d. don't save because included in e.
    |- Re: topic1 e. save
    Thanks! ed

    I have no idea on how, but your file needs to exceed 4Gb before there will be any kind of issue (and the guys think they have removed that limit not anyway)
    Thunderbird will not move slowly or anything with lots of messages.

  • I installed Nik:s suite of plug-ins for LR5 but for some reason not all of them were installed. In the end I uninstalled all of the Nik programs from my Mac but before I reinstalled them I opened LR5 again to check. Under "photo" and "edit in" the plug-in

    I installed Nik:s suite of plug-ins for LR5 but for some reason not all of them were installed. In the end I uninstalled all of the Nik programs from my Mac but before I reinstalled them I opened LR5 again to check. Under "photo" and "edit in" the plug-ins were still presented but no programs opened, of course. after reinstalling the plug-ins one of the programs appeared twice in the list but not the others. I´m going to reinstall them again and I´m wondering if there is anyway of erasing the links to the plug-ins under "photo" and "edit in" ???

    Wow that was really quick, thank you so much.  Im not sure at all which version it was because i said it was around 4 years ago he bought it.  I know it isn't under his username, since he's a PC person (ugh) so i know its probably registered to one of our actual names.  isn't there some way to look it up since we did register it, because I'm not even sure where the disks are from when we bought it (we've moved a lot and also have two storage lockers, i know i would have kept it with other disks) but my cd rom drive is actually broken on my computer as well ( i think it got stepped on and is now squished and won't eject or run disks.)
    So is there anyway they can look up that its registered to one of our names since we did register it when we bought and installed it, or do i really have to find the disk with some sort of proof of purchase (i know there would be no receipt after all this time)
    either way, ill do what you suggested to the best of my abilities and thank you so much for answering my questions, i can't even open the program as its incompatible and find out the info from that) so I'm in a bit of a pickle and your response was so thorough and it didn't seem to be posted long enough to even write a well researched response, thanks, all the best,
    sarucia

  • This is a second question on the same topic. I want to create multiple drags to each drop. I give the drags group names. Step three: run line to drops. Step 4: click object actions Step 5: unclick all but the one group name. It works for 2 out of 3 groups

    I hope that someone will answer this. I want to create a drag and drop.  Each drop has multiple drag answers. I group the drags and give them a Type name. I initial the drops. I go to Object actions. I unclick "accept all" I unclick all but the group I want to go to that drop.  When I preview, two of the drops accept the three choices that they are supposed to accept. But the first one I try, only accepts one choice and lets the others bounce back.  I'd also like to have a reset button which I can't find.  I've spent hours and hours working on this.

    Got it.  When you go to unclick all the choices except the group you want, you have to also change the count. Even if the drags are in a group, the count still considers them individually

  • Hello I am having problems viewing areas of a pdf...it's a form fillable pdf that someone else has completed and saved..I'm able to view all but the areas that have been filled in.. any info would help

    Hello I am having problems viewing areas of a pdf...it's a form fillable pdf that someone else has completed and saved..I'm able to view all but the areas that have been filled in.. any info would help

    Hi Bob, I just tried your suggestion, but the interactive PDF is in spreads by default, no way to change the setting. When I choose to view by single page in Acrobat, it displays a single spread.
    When I choose to view by spreads, it displays 4 pages, two spreads. That's the topic of this whole discussion, I believe. I do own CS 6 at home, however my employer supplied me with CS 5.5. And I have very little, if any, influence on purchasing.
    So, I have no good way to make an interactive PDF (with differing recto/verso headers and footers), that is accessible and shows the correct header/footer. It's either single pages (with one header/footer), or recto/verso headers/footers but PDF only as a spread, as well as I can tell.
    Unless you know something else I can do...
    Best, Marilyn

  • Just got my iPhone 5. I get a message saying it can't be used as it requires iTunes 10.7 or later, when I connect to iTunes. But the current version is 10.63. Please help!

    Just got my iPhone 5. I get a message saying it can't be used as it requires iTunes 10.7 or later, when I connect to iTunes. But the current version is 10.63. Please help!

    iPhone 5 requires iTunes 10.7 or greater to sync with your computer. You need to update iTunes on your computer. If running OS X, this requires OS X 10.6.8 or greater...Snow Leopard.

Maybe you are looking for

  • Error while calling a stored procedure using SQLJ

    I am calling a stored procedure defined inside a package through a SQLJ script. The first parameter of that procedure is a IN OUT parameter which is used as a ROWID for creating a cursor. That ROWID value is the same for every record in the table, th

  • XMP files not moved

    I have searched the fourm and there are a couple of responses to similar questions, but I I can't seen to find how to move the XMP files when I drag a folder of photos from one external drive to another external drive. I drag the folder with 500 phot

  • Acrobat XI full screen mode: how to hide the window control frame

    i mainly use Acrobat to prepare full screen presentations and training, and it is annoying not being able to hide the window control i previous versions the window control frame was always hidden / please bring this option back

  • Reloaded Windows now cant access my iPod data

    I had to reload the Windows Vista and now I can not do anything with my apps on the Touch. What do I do so I can get my apps back in the working order? I have tried to sync but I get a warning that tells me I will lose anything that is not listed in

  • TS1559 do i have to update if i need to enable my grated wifi ?

    i cant turn on my WiFi on my pad air with ios 7.1.2 not even the Bluetooth ... i tried every thing but it keeps unable to turn on ,,, im satisfied with this ios and dont want to updto to ios 8 for now ,, any help ?