Results 1 to 8 of 8

Thread: What does this purge command do ?

  1. #1
    Join Date
    Jan 2014
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    What does this purge command do ?

    Hi I am aiming to remove the configuration files from any past programs I uninstalled with software centre only. I looked around the internet and got many diffferent answers. I thought the command below may be good as it removes dependencies also. Although will this also remove Global dependencies removing 'all packages on my system' or something bizarre so I have nothing left ?

    So what is the sudo apt-get -f purge && sudo apt-get autoremove . Just to be clear I have learnt about sudo apt-get autoremove and sudo apt-get purge for individual packages but don't no much more than this.

    Thanks it appears I am a tiny bit confused

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: What does this purge command do ?

    Code:
    man apt-get
    The -f switch is used to fix broken packages and will give recommendations as to what to do. If it is a simple fix (install a few files) then it will go ahead and do it. If it requires major work (remove and install several packages) then it will ask "Yes" or "No". Otherwise if it can't fix your package system it will give you some suggestions.

    The purge option will delete previous configuration files for only those packages named--in this case by the -f (fix broken) switch. The && connector says "do the next action only if the previous action was successful--with no errors". The autoremove option simply removes obsolete packages--stuff left over when installing a bunch of packages. This is typically a safe command and frees up some space.

    To answer your original question, I don't know if it is possible to delete only software installed from the Software Center. You can install software through the Center, using synaptic, apt-get, aptitude, gdebi, dpkg, or simply copying the files to the correct location. I don't think the Debian package management system keeps track of how you installed a package, only that it is either installed or not installed; correctly installed/configured or broken.

    Dependencies don't get removed. Dependencies always exist for any given package. You can ignore them, force-ignore them, but they still exist. As a general rule, when you ignore dependencies to install a package, that package will probably not work correctly. If it does, you got lucky. If it doesn't then that is expected behavior.

    What exactly are you trying to do?
    Last edited by tgalati4; May 10th, 2014 at 09:42 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Sep 2006
    Beans
    8,623
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: What does this purge command do ?

    The purge command to apt-get won't do anything by itself. You have to give it a package name, or several, to purge. Purge is like 'remove' but also configuration files are removed. Check the manual page for the official details and for what the -f does.

  4. #4
    ibjsb4 is offline Ubuntu addict and loving it
    Join Date
    Sep 2012
    Beans
    5,003

    Re: What does this purge command do ?


  5. #5
    Join Date
    Jan 2014
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: What does this purge command do ?

    Hi thanks I looked up the links. I had seen the apt-get from the Ubuntu documentation. The man pages manual was quite complex but just about understandable to me being a beginner. Basic commands on here being slightly easier to start with I think for me. Any how I meant Sudo apt-get purge <packet name> but when I said 'purge only' it looked like I had not known that from before when I was on the forum prior to this thread.

    To explain better I meant I was looking to globally do a clean up to remove all traces of application I'd uninstalled and hide the dependencies also if no other program was using these. So this might include cleaning - files , configuration files , Ubuntu home files and dependencies no longer needed by them. This is providing nothing else is using them also which commands would hopefully reflect.

    I am still fairly clueless with Ubuntu so please don't let me fool you. I am just parrot repeating things I have read about briefly elsewhere.

    I really appreciate you help and it never goes unnoticed. I hope many convert to Ubuntu entirely because of the help and encouragement they receive here too.

  6. #6
    ibjsb4 is offline Ubuntu addict and loving it
    Join Date
    Sep 2012
    Beans
    5,003

    Re: What does this purge command do ?

    Take a look at 'autoremove' in my above link.

  7. #7
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: What does this purge command do ?

    Normally, you don't need to worry about it. The Debian package system takes care of what's needed and what can be dumped. In fact, you will get a notice from time-to-time about packages that can be safely removed using autoremove option. You don't need to overthink it. And it's generally not advised to manually delete system files unless you know what you are doing. Otherwise you may end up breaking your system and end up back here on the forums trying to fix stuff.

    Enjoy your journey.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  8. #8
    Join Date
    Jan 2014
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: What does this purge command do ?

    Okay thanks.

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
  •