Results 1 to 4 of 4

Thread: Need help scripting apt-get remove

  1. #1
    Member registered user
    Join Date
    Aug 2004
    Posts
    32

    Need help scripting apt-get remove

    I have started the remastering process working off the 5.3.1 DVD release. I know the packages I want to remove and have compiled them into a text file.
    I thought I would just make a simple bash script to remove them, but it always aborts after a few minutes with no real info as to why.

    Here is what I have:
    #!/bin/bash
    apt-get --force-yes --purge remove packagename


    If I run each command it works, but not in the script
    I have also tried:
    cat filewithnames.txt | xargs apt-get --force-yes --purge remove
    This ends with the following: "Do you want to continue? Y/n Abort"


    Same issue.


    For the record, there are approx. 2500 packages that I want to remove. Is there a hard limit?

  2. #2
    Senior Member registered user
    Join Date
    Oct 2003
    Location
    N42.41 W73 and change
    Posts
    401
    Since apt is a front end for dpkg, I wonder if using dpkg itself might work better.

  3. #3
    Member registered user
    Join Date
    Aug 2004
    Posts
    32
    If I script like so:

    #!/bin/bash
    dpkg -r packname
    and so on

    It just throws bad interpeter errors

  4. #4
    Senior Member registered user
    Join Date
    Nov 2003
    Posts
    203
    When you run the script

    #!/bin/bash
    apt-get --force-yes --purge remove packagename

    What exactly is the message that you get? I don't remember whether apt-get requires confirmation in this syntax. If it does you may have to redirect standard input to the script itself for each invocation and provide the yes/no response there.

    cmd << text

    The contents of the shell script up to a line identical to text become the standard input for cmd.

Similar Threads

  1. what's the printer configuration using shell scripting?
    By triple_play45 in forum Hardware & Booting
    Replies: 0
    Last Post: 02-24-2006, 03:34 AM
  2. Scripting Dynamic Partitions?
    By lorddecker in forum Customising & Remastering
    Replies: 3
    Last Post: 02-17-2005, 10:09 PM
  3. how do i remove....SBM........
    By cpc in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 01-02-2005, 07:05 PM
  4. how to remove a packae without using apt-get remove?
    By DimGR in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 06-09-2004, 05:34 PM
  5. How to remove KDE and reinstall KDE 3.1.5?
    By Paradox in forum Hdd Install / Debian / Apt
    Replies: 9
    Last Post: 02-06-2004, 09:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


IBM System X3850-X5 Server w/4x Intel  Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD picture

IBM System X3850-X5 Server w/4x Intel Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD

$1599.99



IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU picture

IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU

$225.00



Unused IBM 09P0037 MAINBOARD For  RS/6000 7044-170 P-Series picture

Unused IBM 09P0037 MAINBOARD For RS/6000 7044-170 P-Series

$375.00



IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM

$179.99



IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU picture

IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU

$999.99



IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES picture

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES

$110.30



IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1) picture

IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1)

$150.00



1 X IBM 720 POWER SERVER WITH 32 GB RAM picture

1 X IBM 720 POWER SERVER WITH 32 GB RAM

$344.97



IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon  E5620 picture

IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon E5620

$199.99



IBM EMC 091-000-091 17 Inch Rackmount LCD Keyboard KVM Console 03N7012 picture

IBM EMC 091-000-091 17 Inch Rackmount LCD Keyboard KVM Console 03N7012

$109.99