Results 1 to 10 of 11

Thread: How do I remove "residual config" through the Terminal?

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Beans
    2

    How do I remove "residual config" through the Terminal?

    The Synaptic Package Manager has the option to selection all of the unused packages in "Not Installed (Residual Config)" section.

    What I want to know is how do I do this in the Terminal?

    I have used the usual commands: apt-get clean/autoclean/autoremove but some unused packages still remain and show up in the Synaptic Package Manager and the Terminal:

    $ sudo apt-get clean && sudo apt-get autoremove --purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED
    (list of packages)
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    How can I use the same function that the Synaptic Package Manager has but in the Terminal?
    Last edited by Sevenleafbranch; February 13th, 2012 at 03:12 AM.

  2. #2
    Join Date
    Jun 2009
    Location
    Open Linux Forums
    Beans
    2,710

    Re: How do I remove "residual config" through the Terminal?

    try the command without the autoremove options:
    Code:
    $ sudo apt-get clean && sudo apt-get --purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
    autoremove is used to give apt-get control over what is selected for deletion, however you are providing your own list...
    I'm not antisocial. I'm just not user friendly...
    Open Linux Forums

  3. #3
    Join Date
    Sep 2011
    Beans
    457

    Re: How do I remove "residual config" through the Terminal?

    from here what do I do?:

    danel@danel-Dimension-4700:~$ sudo apt-get clean && sudo apt-get --purge -y $(dpkg -l | grep '^rc^ | awk '(print $2)')
    >

    I have no desire to remove every selected package that exists that isn't installed, as I would have to download it again, and it takes up a very very small amount of memory on the drive. But wouldn't opening synaptic package manager from the GUI, then selecting each package to uninstall do the trick? And I'm guessing the auto remove options would remove just about everything else

  4. #4
    Join Date
    Jun 2009
    Location
    Open Linux Forums
    Beans
    2,710

    Re: How do I remove "residual config" through the Terminal?

    an error seems to have creeped in:
    Code:
    $ sudo apt-get clean && sudo apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')

    I would normally go for the autoremove thing, but you were saying that you wanted to delete all unused packages.
    I'm not antisocial. I'm just not user friendly...
    Open Linux Forums

  5. #5
    Join Date
    Nov 2006
    Beans
    1,204

    Re: How do I remove "residual config" through the Terminal?

    bleachbit is a good cleaning program

  6. #6
    Join Date
    Feb 2012
    Beans
    2

    Re: How do I remove "residual config" through the Terminal?

    None of the commands worked. They all did the same as the command I used. I ended up using aptitude.

    Is there any commands to achieve what I am asking?
    Last edited by Sevenleafbranch; February 19th, 2012 at 03:06 AM.

  7. #7
    Join Date
    Nov 2006
    Location
    Osaka, Japan
    Beans
    27
    Distro
    Kubuntu Intrepid Ibex (testing)

    Re: How do I remove "residual config" through the Terminal?

    Code:
    sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
    seems to work for me. What errors are you facing? Can you try see if
    Code:
    dpkg -l | grep '^rc' | awk '{print $2}'
    gives you the list of packages with residual config?

  8. #8
    Join Date
    Dec 2008
    Beans
    11

    Re: How do I remove "residual config" through the Terminal?

    Worked well for me. Ubuntu 13.04 beta, Gnome 3.6.

    I couldn't use synaptic because when I clicked on the select window for "residual config" synaptic always crashed.

    Thanks!

    Quote Originally Posted by Syock View Post
    Code:
    sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
    seems to work for me. What errors are you facing? Can you try see if
    Code:
    dpkg -l | grep '^rc' | awk '{print $2}'
    gives you the list of packages with residual config?

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
  •