Page 2 of 14 FirstFirst 123412 ... LastLast
Results 11 to 20 of 132

Thread: HowTo: Create a list of installed packages

  1. #11
    Join Date
    Jan 2007
    Beans
    26
    Distro
    Ubuntu 6.06 Dapper

    Re: HowTo: Create a list of installed packages

    nuclear_eclipse,
    why don't you install Ubuntu server?

  2. #12
    Join Date
    Nov 2006
    Beans
    187

    Re: HowTo: Create a list of installed packages

    where does the output of the command in the first post (to backup) get put?

  3. #13
    Join Date
    May 2006
    Location
    UK
    Beans
    385
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HowTo: Create a list of installed packages

    Quote Originally Posted by jdhore View Post
    where does the output of the command in the first post (to backup) get put?
    The directory that you are in. To find this out type (present working directory)

    Code:
    ~$ pwd
    To put this into a dir called "install" within your home dir you could have
    Code:
    ~$ dpkg --get-selections > ~/install/installed-software
    Registered Linux User #219690 @ Linux Counter, http://counter.li.org.

  4. #14
    Join Date
    May 2006
    Beans
    63

    Re: HowTo: Create a list of installed packages

    Code:
    #!/bin/bash
    
    vsave=0
    vrestore=0
    
    function usage()
    {
            echo "USAGE:"
            echo "$0 [-s] [-r] [-f installedpackages.txt]"
            echo ""
            echo "-s ... save installed packages"
            echo "-r ... restore installed packages"
            echo ""
            echo "-f file.txt ... file where installed packages are saved"
            echo "                or from which installed packages are taken"
            echo ""
            exit 0;
    }
    
    while getopts ":srf:" options
    do
       case "$options" in
       s) vsave=1 ;;
       r) vrestore=1 ;;
       f) file="$OPTARG" ;;
       *) usage;;
       esac
    done
    
    function doSave()
    {
       dpkg --get-selections > $file
    }
    
    function doRestore()
    {
       dpkg --set-selections < $file
    }
    
    if [ "$vsave" == "1" ] && [ "$vrestore" == "1" ] || [ "$file" == "" ]
    then
       usage
    fi
    
    if [ "$vsave" == "1" ] && [ "$file" != "" ]
    then
       doSave
    fi
    
    if [ "$vrestore" == "1" ] && [ "$file" != "" ]
    then
       doRestore
    fi

  5. #15
    Join Date
    Feb 2007
    Location
    London - UK
    Beans
    398
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HowTo: Create a list of installed packages

    The script didn't work for me (posted above) .... just opened up Archive Manager and that's it.
    A Fool and His Money Are Soon Partying!!

  6. #16
    Join Date
    Nov 2006
    Location
    Cairo, Egypt
    Beans
    300

    Re: HowTo: Create a list of installed packages

    Quote Originally Posted by nuclear_eclipse View Post
    Is there an easy way to tell Ubuntu / dpkg to uninstall every package *except* what's listed in that output file? I'm trying to take an existing install, and remove all the unnecesary packages beyond a basic command line system, but I know of no easy way to do so.

    But if I could use a package list from a different system, which is just a command line install, as a basis, and tell it to remove everything but that package list, that would be great.
    Have a look here. It might help you.

  7. #17
    Join Date
    May 2007
    Beans
    109
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo: Create a list of installed packages

    Could someone post a CLEAN Gutsy Install list??

  8. #18
    Join Date
    Jan 2007
    Beans
    1,010
    Distro
    Kubuntu Development Release

    Re: HowTo: Create a list of installed packages

    This might be helpful if you want to uninstall everything except what's listed in your output file: http://www.inportb.com/wp/index.php/...ackages-later/

  9. #19
    Join Date
    Nov 2005
    Beans
    50

    Re: HowTo: Create a list of installed packages

    This is good, it just saved me 1/2 a day of boring work.
    Thanks !!

  10. #20
    Join Date
    Aug 2006
    Beans
    28

    Re: HowTo: Create a list of installed packages

    Code:
    cat toremove | xargs --replace=+ sudo apt-get -y remove +

Page 2 of 14 FirstFirst 123412 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •