Results 1 to 10 of 15

Thread: remove residual config packages/files from the command line

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Edinburgh, Scotland
    Beans
    545
    Distro
    Ubuntu 12.04 Precise Pangolin

    remove residual config packages/files from the command line

    In synaptic, there's an option in the package manager to mark residual config files/packages for complete removal, and I'm wondering how to do this from the command line. I ran

    Code:
    sudo deborphan | xargs sudo apt-get purge -y
    sudo apt-get autoremove -y
    sudo apt-get clean
    but some packages still show up in synaptic, so clearly, these commands aren't removing everything. My main laptop runs a command line ubuntu interface with icewm on top, so I primarily use the command line, and I'd like to know how to remove residual config packages from the command line. Maybe something using dpkg -l to search for packages labeled "rc?" Thanks!

  2. #2
    Join Date
    Oct 2008
    Location
    colachel
    Beans
    517
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: remove residual config packages/files from the command line

    Hi

    For complete removal

    sudo apt-get purge packagename


    more info

  3. #3
    Join Date
    Jun 2009
    Location
    Edinburgh, Scotland
    Beans
    545
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: remove residual config packages/files from the command line

    I know about apt-get purge, but what if I don't remember what the packages are? When I looked in synaptic in gnome, there were packages from a while back that still had config files left all over my system, so is there a way from the command line to run purge for all packages that have already been installed? Thanks!

  4. #4
    Join Date
    Oct 2008
    Location
    colachel
    Beans
    517
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: remove residual config packages/files from the command line


  5. #5
    Join Date
    Jun 2009
    Location
    Edinburgh, Scotland
    Beans
    545
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: remove residual config packages/files from the command line

    Let me rephrase my question... How can I use "dpkg -l" or "dpkg-query" so it will only show the output of packages labeled as "rc?" (As opposed to those labeled "ii" etc). Thanks!

  6. #6
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: remove residual config packages/files from the command line

    Maybe this will do?
    Code:
    dpkg-query -W -f='${Package}\t${Status}\n' | awk '/deinstall/{print $1}'

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
  •