Script to Remove a List of Debian Packages
Does any one know how i can write a script that will remove a list of debian packages using apt-get?
|
if you know the package names and the syntax of the apt-get remove or whatever it is.
for i in `cat list_of_packages`;do apt-get remove stuff here $i;done |
Are you doing something especialy different? If you want to remove several packages via apt-get you simply list them all with a space between the names. All will be removed as well as what depends on them.
Code:
apt-get remove package_a package_b package_c package_d... |
*shrug* he asked for a script, not how to do it via just the command line :-P
|
I know that. I was just wondering why one would need to write a script for a one-shot thing. Once a package is removed, its gone. Why script the script?
|
Maybe because the list of packages-to-remove are in a file. But in that case the command coudl be easily changed to something like:
cat packagelist.txt | xargs apt-get remove |
I await zael's answer
|
All times are GMT -5. The time now is 12:10 PM. |