This solved my problem!! Thanks! I used this command: system('/sys/bus/pci/devices/0000:01:00.0/remove')