Using pacman to search for packages - libraries no more used / needed

Is there a way to use pacmant to "clean out" the system, by searcing and deleting all packages and libraries no more needed nor used by anything?

Are you looking for options different from these? http://bbs.archlinux.org/viewtopic.php?id=88987
I don't think there's a completely automatic way. At least, not a way that I would trust.
Last edited by drcouzelis (2010-01-22 16:42:31)

Similar Messages

  • Search for packages with pacman

    Normally I searched for packages with packman -Ss ...
    But is there a posiblity that it shows only that packages wich i havent installed?

    pacman -Ss <packagename>
    shows packages in the repositories you have specified in /etc/pacman.conf, whether they are installed or not
    pacman -Q
    will list the packages installed on your system

  • How to search for packages that Names including "'" [solved]

    Hi everyone
    first ,forgive my english lvevel
    and I want to know
    How to search for packages that Names including "'"
    for instance
    $ pacman -Ss America's Army
    it returned
    >
    Please help me ,many thanks!
    Last edited by icywalk (2010-04-05 13:09:26)

    fyi America's Army in the AUR as armyops if you're looking for it.

  • Parent class loaders are not searched for native libraries?

    I'm loading a native library in the default system classloader. I think create several new children of the default class loader and instantiate some new objects in those child classloaders. The problem is that those new objects get a LinkUnsatisfiedError when they try to call the native methods.
    I was under the impression that ClassLoaders would delegate native method class to their parent class loader, the same way that they do when searching for class definition. This is confirmed by this quote from http://java.sun.com/docs/books/jni/html/design.html:
    "Because each class loader maintains a set of native libraries, the programmer may use a single library to store all the native methods needed by any number of classes as long as those classes have the same defining loader."
    I'm in a serious catch-22 here, because I cannot load the native library in the child classloaders (native libs are not allowed to be loaded by multiple class loaders), and I need to put the objects in a separate classloader. What is the solution?

    i.getClass().getResourceAsStream("/hello.txt"); //this should be disallowedWhy is getting a resource so bad? It puts a dependency on a module, but in a plugin system, dependencies should be supported. Netbeans platform supports this same thing. I use image resources from some core modules at my own risk. If you really want to block it, override the getResource method of URLClassLoader to block unwanted resource fetching. You will have to use the SecurityManager, AccessController, ProtectionDomain, and AccessControlContext and I'm not going to tell you how ;)
    i.getClass().newInstance(); //something even worseNot possible to block without package private constructors or similar restrictions as above.

  • I cant search for shared libraries on my mac

    okay, so i just got a macbook pro and im trying to move my music from my pc to my mac. I've turned on home sharing on both computers but when i try to search for my pc's library on my mac there isn't an option to look for other libraries on my macs sharing tab. helpp!!

    it's now a checkbox in preferences > general

  • [SOLVED by xyne] Search for packages I have but are NOT installed?

    Hi all,
    I run a couple of computers on Arch (both 64-bit), was just wondering if I could copy the /var/cache/pacman/pkg from one computer to the other, and then run some command to install from the cache all packages that are not currently installed. Basically it would be something like "go through all the packages in /var/cache/pacman/pkg, if any are installed ignore them, if a newer version is installed ignore them, but if no version of this package is installed then install it.
    Last edited by ngoonee (2009-06-26 05:17:35)

    Try this:
    #!/usr/bin/perl
    use strict;
    use warnings;
    exit(1) if not @ARGV;
    my $cachedir = $ARGV[0];
    $cachedir = substr($cachedir,0,-1) if substr($cachedir,-1) eq '/';
    opendir(my $dh, $ARGV[0]) or die $!;
    my @cache_pkgs = map { s/-[^-]+-[^-]+(?:-i686|-x86_64|-any)?\.pkg\.tar\.gz$//; $_ }
    grep {/\.pkg\.tar\.gz$/}
    readdir($dh);
    closedir($dh);
    my @installed_pkgs = split(/\s*\n\s*/, `pacman -Qq`);
    my %cache_pkgs;
    $cache_pkgs{$_} = 1 foreach @cache_pkgs;
    my %installed_pkgs;
    $installed_pkgs{$_} = 1 foreach @installed_pkgs;
    foreach (keys(%cache_pkgs))
    delete($cache_pkgs{$_}) if exists($installed_pkgs{$_});
    # uncomment these lines if you just want a list of uninstalled packages
    # without filtering dependencies
    # @cache_pkgs = keys(%cache_pkgs);
    # print "$_\n" foreach @cache_pkgs;
    # exit();
    my $pkg_files;
    foreach my $pkg (keys(%cache_pkgs))
    opendir(my $dh, $cachedir) or die $!;
    my @pkg_files = grep {/^\Q$pkg\E/} readdir($dh);
    closedir($dh);
    foreach my $pkg_file (@pkg_files)
    if ( $pkg_file =~ m/^(.+)-([^-]+-[^-]+)(?:-i686|-x86_64|-any)?\.pkg\.tar\.gz$/ )
    $pkg_file = $cachedir . '/' . $pkg_file;
    if (not exists($pkg_files->{$1}))
    $pkg_files->{$1}->{'ver'} = $2;
    $pkg_files->{$1}->{'file'} = $pkg_file;
    else
    my $ver = $pkg_files->{$1}->{'ver'};
    if (&compare_versions($2,$ver))
    $pkg_files->{$1}->{'ver'} = $2;
    $pkg_files->{$1}->{'file'} = $pkg_file;
    foreach my $pkg (keys(%{$pkg_files}))
    my $pkg_file = $pkg_files->{$pkg}->{'file'};
    my $pkginfo = `tar -O -zxf $pkg_file .PKGINFO`;
    foreach my $line (split(/\s*\n\s*/, $pkginfo))
    if ($line =~ /^depend\s+=\s+([^>=\s]+)/)
    delete($cache_pkgs{$1}) if exists($installed_pkgs{$1});
    @cache_pkgs = keys(%cache_pkgs);
    print "$_\n" foreach @cache_pkgs;
    sub compare_versions
    my ($a,$b) = @_;
    return -1 if not defined($a) and defined($b);
    return 1 if defined($a) and not defined($b);
    return 0 if not defined($a) and not defined($b);
    my ($rel_a,$rel_b) = (0,0);
    if ($a =~ m/(.*)-(.+)$/) {($a,$rel_a)=($1,$2);}
    if ($b =~ m/(.*)-(.+)$/) {($b,$rel_b)=($1,$2);}
    my @a = split(/\./,$a);
    my @b = split(/\./,$b);
    my $len_a = scalar @a;
    my $len_b = scalar @b;
    my $n = ($len_a < $len_b) ? $len_a : $len_b;
    for (my $i=0; $i<$n; $i++)
    my ($int_a,$alph_a,$dash_a) = ($a[$i] =~ m/^(\d*)(.*?)(_.*)?$/);
    my ($int_b,$alph_b,$dash_b) = ($b[$i] =~ m/^(\d*)(.*?)(_.*)?$/);
    $int_a = 0 if $int_a eq '';
    $int_b = 0 if $int_b eq '';
    if ($int_a != $int_b)
    return $int_a <=> $int_b;
    if (length($alph_a) and not length($alph_b))
    return -1;
    if (not length($alph_a) and length($alph_b))
    return 1;
    if ($alph_a ne $alph_b)
    return $alph_a cmp $alph_b;
    return 1 if defined($dash_a) and not defined($dash_b);
    return -1 if not defined($dash_a) and defined($dash_b);
    if (defined($dash_a) and defined($dash_b))
    my $dash_cmp = $dash_a cmp $dash_b;
    return $dash_cmp if $dash_cmp != 0;
    return $len_a <=> $len_b if not $len_a == $len_b;
    return $rel_a <=> $rel_b;
    Save it as "list_pkgs", make it executable and then run it with
    ./list_pkgs /var/cache/pacman/pkg
    It should spit back a list which contains all packages in the cache which are currently uninstalled, minus any packages which are dependencies of others. To install those packages, combine it with pacman:
    pacman -S $(./list_pkgs /var/cache/pacman/pkg)
    This doesn't completely solve the issue of explicit versus implicit installation, but I expect that this would be more manageable than installing everything explicitly. I've commented on lines which can be uncommented to get a simple list which ignores dependency relationships.
    Btw, the script isn't really as long as it might look. The compare_versions function, which I copied over from another module, nearly doubles the size of the script.
    *edited for typos*
    Last edited by Xyne (2009-06-26 04:30:12)

  • Package search for multiple word string?

    Ok, im feeling really dumb, but how do I search for packages using multiple words in a single string?  For example if I do the command "pacman -Ss session manager" it will return a huge list of all packages with the word session and all packages with the word manager, but what i really want to see is the smaller list of only the packages that contain the entire exact string session manager.

    For me yaourt does the trick if you use ezzetabi's example ('session.*manager'). However, for 'session manager' only it doesn't.
    You could try packer (in AUR). I just tried all three of them and packer seems to also look for the two words together only if you use '... ...' only.

  • I try to open iPhoto and it asks what library file I want to use. I have Find Any File application that someone once gave me the "magic" file to search for, but I do not remember the file

    I had this problem before and someone gave me a "magic" filename to search for using my Find Any File application, but I cannot remember the file name.  Is it iPhoto6-something?

    Hello Joel,
    Don't know how to determine my OS
    To determine your OS click on the apple in the upper left corner of your screen and click "About this Mac". The "About" panel will tell you all about your Mac.
    On my mac (OS 10.7.3) I can search for iPhoto Libraries like this:
    Select my Home Folder in the Finder
    Type in ⌘-F to activate a search
    Set the "Search" to "This Mac"
    Set the "Kind" selector to "Other" and enter "iPhoto Library" into the search field.
    This should reveal all iPhoto Libraries on your Mac.
    With "Find any File" you could search for the ".iPhoto"-extension.
    Regards
    Léonie

  • Field for packaging code

    Hi all,
    i am searching for packaging code field.my packaging code data is comming in the table THM073-pacod or THM074-pacod.
    but how to relate this table with packaging material which is present in mara table.
    i am writing a report for delivery order.here we are using packaging material like carton & pallet.we have created this packaging materials in material master.for this packaging material, i have to refer a packaging code which is present in THM073 table.
    plz suggest me how i can extract that data from that table.it is very very urgent.
    any help is highly appreaciated.
    Regards
    pabitra

    Hi Pabitra,
           You can find the relationship between Dangerous Goods Regulation and Material in table DGTMD. Using this relationship you can link Material and PACOD using table THM073.
           Hope this will solve your problem.
    Regards,
    Sathish
    Note : Reward useful Answers

  • How to search for particular string in array?

    I am struggling to figure out how to search array contents for a string and then delete the entry from the array if it is found.
    The code for a program that allows the user to enter up to 20 inventory items (tools) is posted below; I apologize in advance for it as I am also not having much success grasping the concept of OOP and I am certain it is does not conform although it all compiles.
    Anyway, if you can provide some assistance as to how to go about searching the array I would be most grateful. Many thanks in advance..
    // ==========================================================
    // Tool class
    // Reads user input from keyboard and writes to text file a list of entered
    // inventory items (tools)
    // ==========================================================
    import java.io.*;
    import java.text.DecimalFormat;
    public class Tool
    private String name;
    private double totalCost;
    int units;
      // int record;
       double price;
    // Constructor for Tool
    public Tool(String toolName, int unitQty, double costPrice)
          name  = toolName;
          units = unitQty;
          price = costPrice;
       public static void main( String args[] ) throws Exception
          String file = "test.txt";
          String input;
          String item;
          String addItem;
          int choice = 0;
          int recordNum = 1;
          int qty;
          double price;
          boolean valid;
          String toolName = "";
          String itemQty = "";
          String itemCost = "";
          DecimalFormat fmt = new DecimalFormat("##0.00");
          // Display menu options
          System.out.println();
          System.out.println(" 1. ENTER item(s) into inventory");
          System.out.println(" 2. DELETE item(s) from inventory");
          System.out.println(" 3. DISPLAY item(s) in inventory");
          System.out.println();
          System.out.println(" 9. QUIT program");
          System.out.println();
          System.out.println("==================================================");
          System.out.println();
          // Declare and initialize keyboard input stream
          BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
          do
             valid = false;
             try
                System.out.print(" Enter an option > ");
                input = stdin.readLine();
                choice = Integer.parseInt(input);
                System.out.println();
                valid = true;
             catch(NumberFormatException exception)
                System.out.println();
                System.out.println(" Only numbers accepted. Try again.");
          while (!valid);
          while (choice != 1 && choice != 2 && choice != 9)
                System.out.println(" Not a valid option. Try again.");
                System.out.print(" Enter an option > ");
                input = stdin.readLine();
                choice = Integer.parseInt(input);
                System.out.println();
          if (choice == 1)
             // Declare and initialize input file
             FileWriter fileName = new FileWriter(file);
             BufferedWriter bufferedWriter = new BufferedWriter(fileName);
             PrintWriter dataFile = new PrintWriter(bufferedWriter);
             do
                addItem="Y";
                   System.out.print(" Enter item #" + recordNum + " name > ");
                   toolName = stdin.readLine();
                   if (toolName.length() > 15)
                      toolName = toolName.substring(0,15); // Convert to uppercase
                   toolName = toolName.toUpperCase();
                   dataFile.print (toolName + "\t");
                   do
                      valid = false;
                      try
                         // Prompt for item quantity
                         System.out.print(" Enter item #" + recordNum + " quantity > ");
                         itemQty = stdin.readLine();
                         // Parse integer as string
                         qty = Integer.parseInt (itemQty);
                         // Write item quantity to data file
                         dataFile.print(itemQty + "\t");
                         valid=true;
                      catch(NumberFormatException exception)
                         // Throw error for all non-integer input
                         System.out.println();
                         System.out.println(" Only whole numbers please. Try again.");
                   while (!valid);
                   do
                      valid = false;
                      try
                         // Prompt for item cost
                         System.out.print(" Enter item #" + recordNum + " cost (A$) > ");
                         itemCost = stdin.readLine();
                         // Parse float as string
                         price = Double.parseDouble(itemCost);
                         // Write item cost to data file
                         dataFile.println(fmt.format(price));
                         valid = true;
                      catch(NumberFormatException exception)
                         // Throw error for all non-number input (integers
                      // allowed)
                         System.out.println();
                         System.out.println(" Only numbers please. Try again.");
                   while (!valid);
                   // Prompt to add another item
                   System.out.println();
                   System.out.print(" Add another item? Y/N > ");
                   addItem = stdin.readLine();
                   while ((!addItem.equalsIgnoreCase("Y")) && (!addItem.equalsIgnoreCase("N")))
                      // Prompt for valid input if not Y or N
                      System.out.println();
                      System.out.println(" Not a valid option. Try again.");
                      System.out.print(" Add another item? Y/N > ");
                      addItem = stdin.readLine();
                      System.out.println();
                   // Increment record number by 1
                   recordNum++;
                   if (addItem.equalsIgnoreCase("N"))
                      System.out.println();
                      System.out.println(" The output file \"" + file + "\" has been saved.");
                      System.out.println();
                      System.out.println(" Quitting program.");
            while (addItem.equalsIgnoreCase("Y"));
    // Close input file
    dataFile.close();
       if (choice == 2)
       try {
          Read user input (array search string)
          Search array
          If match found, remove entry from array
          Confirm "deletion" and display new array contents
       catch block {
    } // class
    // ==========================================================
    // ListToolDetails class
    // Reads a text file into an array and displays contents as an inventory list
    // ==========================================================
    import java.io.*;
    import java.util.StringTokenizer;
    import java.text.DecimalFormat;
    public class ListToolDetails {
       // Declare variable
       private Tool[] toolArray; // Reference to an array of objects of type Tool
       private int toolCount;
       public static void main(String args[]) throws Exception {
          String line, name, file = "test.txt";
          int units, count = 0, record = 1;
          double price, total = 0;
          DecimalFormat fmt = new DecimalFormat("##0.00");
          final int MAX = 20;
          Tool[] items = new Tool[MAX];
          System.out.println("Inventory List");
          System.out.println();
          System.out.println("REC.#" + "\t" + "ITEM" + "\t" + "QTY" + "\t"
                + "PRICE" + "\t" + "TOTAL");
          System.out.println("\t" + "\t" + "\t" + "\t" + "PRICE");
          System.out.println();
          try {
             // Read a tab-delimited text file of inventory items
             FileReader fr = new FileReader(file);
             BufferedReader inFile = new BufferedReader(fr);
             StringTokenizer tokenizer;
             while ((line = inFile.readLine()) != null) {
                tokenizer = new StringTokenizer(line, "\t");
                name = tokenizer.nextToken();
                try {
                   units = Integer.parseInt(tokenizer.nextToken());
                   price = Double.parseDouble(tokenizer.nextToken());
                   items[count++] = new Tool(name, units, price);
                   total = units * price;
                } catch (NumberFormatException exception) {
                   System.out.println("Error in input. Line ignored:");
                   System.out.println(line);
                System.out.print(" " + count + "\t");
                System.out.print(line + "\t");
                System.out.print(fmt.format(total));
                System.out.println();
             inFile.close();
          } catch (FileNotFoundException exception) {
             System.out.println("The file " + file + " was not found.");
          } catch (IOException exception) {
             System.out.println(exception);
          System.out.println();
       //  Unfinished functionality for displaying "error" message if user tries to
       //  add more than 20 tools to inventory
       public void addTool(Tool maxtools) {
          if (toolCount < toolArray.length) {
             toolArray[toolCount] = maxtools;
             toolCount += 1;
          } else {
             System.out.print("Inventory is full. Cannot add new tools.");
       // This should search inventory by string and remove/overwrite matching
       // entry with null
       public Tool getTool(int index) {
          if (index < toolCount) {
             return toolArray[index];
          } else {
             System.out
                   .println("That tool does not exist at this index location.");
             return null;
    }  // classData file contents:
    TOOL 1     1     1.21
    TOOL 2     8     3.85
    TOOL 3     35     6.92

    Ok, so you have an array of Strings. And if the string you are searching for is in the array, you need to remove it from the array.
    Is that right?
    Can you use an ArrayList<String> instead of a String[ ]?
    To find it, you would just do:
    for (String item : myArray){
       if (item.equals(searchString){
          // remove the element. Not trivial for arrays, very easy for ArrayList
    }Heck, with an arraylist you might be able to do the following:
    arrayList.remove(arrayList.indexOf(searchString));[edit]
    the above assumes you are using 1.5
    uses generics and for each loop
    [edit2]
    and kinda won't work it you have to use an array since you will need the array index to be able to remove it. See the previous post for that, then set the value in that array index to null.
    Message was edited by:
    BaltimoreJohn

  • Search for and edit single record in database

    I am creating a few forms that access an Access database that will be used to enter data into the database.  I am able to open records from the database and scroll through records one at a time and have added features to be able to search for and display a single record.  The problem that I am having  is when I load a single record and then edit that record, I am unable to save any changes made to the record, in other words, the record doesn't update on the database.
    I can add new records and edit records as long as I scroll to them using .next(), .last(), .first(), and .previous() commands; however, when I load a single record I can't figure out how to save changes to that record in the database.

    Ok...so I think i can get it to work by doing something like:
    xfa.sourceSet.DataConnection.open();
    xfa.sourceSet.DataConnection.first();
    var oRecordList = ???????????
    var nCount = oRecordList.length;
    for (var i = 0; i < nCount; i++){
        if (CurrentRecord.rawValue != SearchField.rawValue){
            xfa.sourceSet.DataConnection.next();
    where CurrentRecord is a text field that shows the index of the current record and SearchField is the field where a user enters the record that they are searching for.
    I think I just need to figure out how to count the number of records in the database.  Any ideas?

  • Itunes store is a white screen, cannot search for music, any ideas?

    When I open my ITunes and go to ITunes store it loads but just gives me a blank white screen, I cannot search for anything to purchase, my ITunes needs updating but I no longer get the pop up notification for it, any ideas?

    Hey maggz2008,
    I have an article for you that should be able to help you address this issue with your ability to reach the iTunes Store:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • HT4759 Can I track my iPhone from my iPad if I have not activated the 'find my iPhone' on my mobile? Or does this need to be set up already in order to search for my phone?

    Can I track my iPhone from my iPad if I have not activated the 'find my iPhone' on my mobile? Or does this need to be set up already in order to search for my phone?

    No.
    You needed to have set it up prior.

  • I am webmaster for our church (C of E) in Dorset, UK.   The church has charitable status, and is cash-strapped.  I am searching for the cheapest download package in order to use Photoshop & Dreamweaver - at home and in the Parish Office. This page (https:

    I am webmaster for our church (C of E) in Dorset, UK.   The church has charitable status, and is cash-strapped.  I am searching for the cheapest download package in order to use Photoshop & Dreamweaver - at home and in the Parish Office. This page (https://www.adobe.com/content/dotcom/uk/volume-licensing/non-profit.edu.html) suggests that we are eligible for discount BUT provides no information on pricing for me to present to the PCC for them to authorise purchase.  Any tips?

    You have to contact a reseller and they will fix you up with a plan and verify your eligibility. That's just how it work. when you are eligible, the normal student pricing applies, give or take any extra discounts based on the number of licenses you buy, which would not apply in your case.
    Creative Suite 6
    Mylenium

  • How to Return List of Packages from Pacman/Yaourt Search

    ----EDIT----
    Changed the name of the script from pacsearch to pacdot.
    Apparently yaourt -Ssaq does this, so this script isn't as necessary as I thought. Although, I still find using pacdot -w to open the results in a text document helpful.
    ----/EDIT----
    This isn't a question; it's a script I wrote. I thought someone else might find this useful.
    I keep finding myself searching with pacman or yaourt and wishing I could get just the package names, not all of the extra stuff. For example, I'd love to be able to run yaourt -Sa $(yaourt -Ssa package). It doesn't seem like pacman and yaourt have an option for this (not that I can tell, at least), so I wrote a python script to do it. Copy it if you'd like. You can name it what you want, but I'll refer to it as pacdot.py.
    pacdot.py package will be like yaourt -Ssa package but only list the package names.
    I added a few extra options:
    pacdot.py -o package will only list results from the official Arch repositories, not the AUR.
    pacdot.py -i package will install all the found packages. If you've ever thought about running something like yaourt -Sa $(yaourt -Ssa package), that's what this command does.
    pacdot.py -w package will:
    Create a file called 'the-package-you-searched.txt',
    Write an example command that would install the found packages,
    (yaourt -Sa all-of-the-results),
    Write each result on a new line, and
    Open the file for you (with your default text editor).
    Here's the code:
    #!/bin/python3
    import argparse
    import re
    from subprocess import Popen, PIPE, call
    from collections import deque
    desc = ''.join(('Search the official Arch and AUR databases ',
    'and return package names only. ',
    'e.g.: `pacdot.py arch` will return "arch", ',
    'whereas `$ yaourt -Ssa arch` will return ',
    '"community/arch 1.3.5-10',
    ' A modern and remarkable revision control system."'
    parser = argparse.ArgumentParser(description=desc)
    parser.add_argument('package',
    help='Package to search with pacman')
    parser.add_argument('-o', '--official', action='store_true',
    help='Search official repositories only, not the AUR')
    parser.add_argument('-i', '--install', action='store_true',
    help='Install found packages')
    parser.add_argument('-w', '--write', action='store_true',
    help='Write to file')
    #Set args strings.
    args = parser.parse_args()
    pkg = args.package
    official_only = args.official
    install = args.install
    write = args.write
    # Do yaourt search.
    package_search = Popen(['yaourt', '-Ssa', '%s' % pkg], stdout=PIPE).communicate()
    # Put each found package into a list.
    package_titles_descs = str(package_search[0]).split('\\n')
    # Strip off the packages descriptions.
    package_titles = [package_titles_descs[i]
    for i in range(0, len(package_titles_descs), 2)]
    # Remove empty item in list.
    del(package_titles[-1])
    # Make a separate list of the non-aur packages.
    package_titles_official = deque(package_titles)
    [package_titles_official.remove(p)
    for p in package_titles if p.startswith('aur')]
    # Strip off extra stuff like repository names and version numbers.
    packages_all = [re.sub('([^/]+)/([^\s]+) (.*)',
    r'\2', str(p))
    for p in package_titles]
    packages_official = [re.sub('([^/]+)/([^\s]+) (.*)',
    r'\2', str(p))
    for p in package_titles_official]
    # Mark the aur packages.
    # (Not needed, just in case you want to modify this script.)
    #packages_aur = packages_all[len(packages_official):]
    # Set target packages to 'all' or 'official repos only'
    # based on argparse arguments.
    if official_only:
    packages = packages_official
    else:
    packages = packages_all
    # Print the good stuff.
    for p in packages:
    print(p)
    if write:
    # Write results to file.
    filename = ''.join((pkg, '.txt'))
    with open(filename, 'a') as f:
    print(''.join(('Yaourt search for "', pkg, '"\n')), file=f)
    print('To install:', file=f)
    packages_string = ' '.join(packages)
    print(' '.join(('yaourt -Sa', packages_string)), file=f)
    print('\nPackage list:', file=f)
    for p in packages:
    print(p, file=f)
    # Open file.
    call(('xdg-open', filename))
    if install:
    # Install packages with yaourt.
    for p in packages:
    print(''.join(('\n\033[1;32m==> ', '\033[1;37m', p,
    '\033[0m')))
    Popen(['yaourt', '-Sa', '%s' % p]).communicate()
    Last edited by GreenRaccoon23 (2014-12-22 19:17:37)

    expac works only with official and unofficial repos, not with the AUR, but it's very nice.
    Adding  '-q' should help, grep to weed out false positives.
    yaourt -Sa $(yaourt -Ssaq pulse)
    works, but
    $ yaourt -Sa $(yaourt -Ssaq chrome)
    resolving dependencies...
    looking for inter-conflicts...
    warning: removing 'chromium' from target list because it conflicts with 'chromium-no-sse2'
    error: unresolvable package conflicts detected
    error: failed to prepare transaction (conflicting dependencies)
    :: chromium-no-sse2 and chromium-scroll-pixelGs are in conflict
    so at least
    $ yaourt -Sa $(yaourt -Ssaq chrome|grep google)
    is needed.
    Edit: Also:
    $ LC_ALL=C TZ=GMT0 diff -Naur /usr/bin/pacsearch /usr/local/bin/pacsearch
    --- /usr/bin/pacsearch 2014-11-21 11:20:37.000000000 +0000
    +++ /usr/local/bin/pacsearch 2014-12-21 08:21:14.758856006 +0000
    @@ -84,7 +84,7 @@
    my %allpkgs = ();
    -my $syncout = `pacman -Ss '@ARGV'`;
    +my $syncout = `pacman -Ssq '@ARGV'`;
    # split each sync search entry into its own array entry
    my @syncpkgs = split(/\n^(?=\w)/m, $syncout);
    # remove the extra \n from the last desc entry
    @@ -110,7 +110,7 @@
    $allpkgs{$pkgfields[1]} = [ @pkgfields ];
    -my $queryout = `pacman -Qs '@ARGV'`;
    +my $queryout = `pacman -Qqs '@ARGV'`;
    # split each querysearch entry into its own array entry
    my @querypkgs = split(/\n^(?=\w)/m, $queryout);
    # remove the extra \n from the last desc entry
    $ /usr/local/bin/pacsearch pulse
    libpulse
    pulseaudio
    libao
    libcanberra-pulse
    libpulse
    paprefs
    pavucontrol
    pulseaudio
    pulseaudio-alsa
    floyd
    libcec
    mate-media-pulseaudio
    mate-settings-daemon-pulseaudio
    ponymix
    projectm-pulseaudio
    Although why not simply use pacman or expac?
    Last edited by karol (2014-12-21 08:26:48)

Maybe you are looking for