Projects and resources (En) > Create masters

Village_RC2 : Openbox community spin

<< < (14/14)

Taco.22:

--- Code: ---apt-get autoremove --purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
--- Fin du code ---
Whoa - complicated but it kind of makes sense.  I'm new to this so it's still all a steep learning curve.


--- Code: ---apt-get autoremove --purge -y
--- Fin du code ---
That all makes sense.  Apt-get will remove and purge files, with -y or yes as default.


--- Code: ---dpkg -l | grep '^rc'
--- Fin du code ---
That tells dpkg to make a list, with the parameter of  files that are rc or run command of applications that have been removed.


--- Code: ---awk '{print $2}'
--- Fin du code ---
That seems to give a field of name only.  If you did -

--- Code: ---dpkg -l | awk '{print $3}'
--- Fin du code ---
everything is listed as its version number.  A different $number represents a different field.  It could be its type, or where it came from, or what platform it belongs to. 

Put it all together and you are asking apt-get to remove and purge the config files of applications that dpkg has listed by name and as removed.

See, simple!!!

djohnston:

--- Citation de: mélodie le 05 février 2013 à 11:27:36 ---what does everything mean starting from the '$' up to the ')'?

--- Fin de citation ---

dpkg -l outputs a list of all installed packages. dpkg -l | grep '^rc' selects installed packages marked with the "rc" (residual config) tag. awk '{print $2}' means print the second field of the displayed record. So, dpkg -l | grep '^rc' | awk '{print $2}' would output the second field of every dpkg record containing the "rc" tag. Here's an example of what the output would look like if just selecting packages with the "rc" tag:

rc  brasero-common                           3.4.1-3                            all          Common files for the Brasero CD burning application and library

melodie:
I'll have to try these portions of command line in Debian once I'll have booted to it next time. Thanks for your explanations.

Taco.22 : about the "y" : yes, I knew, this is why I didn't ask about this part. If we don't put the --yes (or -y) option the package manager stops to ask confirmation.

djohnston:
That's weird. Taco.22's response (Reply #65) shows up as being one minute before mine. Did I just miss it entirely, or is it a time zone difference, or ... ?

Navigation

[0] Index des messages

[*] Page précédente

Utiliser la version classique