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
  •  


SK Hynix 64B PC4-2933Y Server Memory DDR4 RAM HMAA8GR7MJR4N-WM picture

SK Hynix 64B PC4-2933Y Server Memory DDR4 RAM HMAA8GR7MJR4N-WM

$499.99



SK Hynix Server Memory 32GB (1x32GB) RAM DDR4 2400MHz HMA84GR7MFR4N Lot of 12 picture

SK Hynix Server Memory 32GB (1x32GB) RAM DDR4 2400MHz HMA84GR7MFR4N Lot of 12

$1599.99



16GB KIT (2x8GB) DDR4 Gamer Desktop RAM PC4 MIXED BRANDS picture

16GB KIT (2x8GB) DDR4 Gamer Desktop RAM PC4 MIXED BRANDS

$65.00



Micron MTC4C10163S1UC48BA1 8GB RAM DDR5 4800MHz picture

Micron MTC4C10163S1UC48BA1 8GB RAM DDR5 4800MHz

$87.00



Major Brand 8 GB PC3L-12800 (DDR3-1600) 2Rx8 DDR3L Laptop Memory RAM picture

Major Brand 8 GB PC3L-12800 (DDR3-1600) 2Rx8 DDR3L Laptop Memory RAM

$10.99



Kingston Fury Beast 32GB(2 x 16GB) KF552C36BBEA-16 DDR5 5200MHz RAM - R1031A picture

Kingston Fury Beast 32GB(2 x 16GB) KF552C36BBEA-16 DDR5 5200MHz RAM - R1031A

$299.95



LOT OF 23 Ram Sticks-Corsair Vengeance CMZ8GX3M2A1600C9 4GB (4GBx23=92GB Total) picture

LOT OF 23 Ram Sticks-Corsair Vengeance CMZ8GX3M2A1600C9 4GB (4GBx23=92GB Total)

$129.99



Samsung 8GB DDR4 2666MHz Desktop Ram Memory (M378A1K43DB2-CTD) Tested picture

Samsung 8GB DDR4 2666MHz Desktop Ram Memory (M378A1K43DB2-CTD) Tested

$29.99



16GB RAM Replacement for Samsung M393A2G40DB0-CPB | DDR4 2133Mhz PC4-17000 2Rx4 picture

16GB RAM Replacement for Samsung M393A2G40DB0-CPB | DDR4 2133Mhz PC4-17000 2Rx4

$134.95



Kingston (HyperX Fury ) DDR4 64gb 4x16 2933 MHz (PC4-23400) picture

Kingston (HyperX Fury ) DDR4 64gb 4x16 2933 MHz (PC4-23400)

$375.00