# How To Remove All Gcode Files Manually (Fix for stuck file) (Buildbotics)

**URL:** <https://forum.onefinitycnc.com/t/how-to-remove-all-gcode-files-manually-fix-for-stuck-file-buildbotics/5626>\
**Category:** Controller (Buildbotics) FAQ\
**Created:** [May 19, 2021, 5:17pm UTC](https://forum.onefinitycnc.com/t/how-to-remove-all-gcode-files-manually-fix-for-stuck-file-buildbotics/5626 "2021-05-19T17:17:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![OnefinityCNC](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.onefinitycnc.com/onefinitycnc/32/7_2.png) [@OnefinityCNC](https://forum.onefinitycnc.com/u/OnefinityCNC)\
**Post date:** [May 19, 2021, 5:17pm UTC](https://forum.onefinitycnc.com/t/how-to-remove-all-gcode-files-manually-fix-for-stuck-file-buildbotics/5626/1 "2021-05-19T17:17:34Z")

</div>

How to remove all gcode files manually.

This process is used for when you see a stuck file.  
In 99% of cases, a incompatible file was loaded (such as the design file) and not gcode. The controller can read files labeled .nc, .ngc, .gcode.  
After running the below instructions, ensure you update to 1.0.9 firmware (or later) and the controller will prevent incompatible files from being able to be uploaded.

> [@Firmware Update 1.0.9 (12/17/21) (Outdated Firmware)](https://forum.onefinitycnc.com/t/firmware-update-1-0-9-12-17-21-latest-release/8483):
>
> 1.0.9 is the sixth firmware update for the Onefinity CNC Controller. Download here: [onefinity-1.0.9.tar.bz2](https://forum.onefinitycnc.com/uploads/short-url/aAOdLNzjxc0WqfdILXSTO9LMalC.bz2) (2.2 MB) (sometimes, computers (esp macs) like to ‘unzip’ or decompress the file, ensure you are loading the full zipped file ending in .bz2) How To Install: Updating via USB You’ll do an update via USB using the following steps: Copy the blue .bz2 file below onto a usb stick (it must be formatted as fat 32 or ntsf). Click the flyout menu (three bars on top left), general, under fir…

These instructions are intended for scenarios where, for some reason, the controller becomes unresponsive, due to a bad gcode file, loading a design file and not gcode, or potentially a bug in the handling of one or more files.

You must plug a USB keyboard into your controller.

Press Ctrl+T and then press C

This will give you a terminal window on the controller.

Type the following, exactly, then press Enter:

sudo rm /var/lib/bbctrl/upload/\* , then press Enter.

Press Ctrl+D

You will now be back to the controller software. You may need to hit the ‘Refresh’ button in the browser.

Ensure you update to the latest firmware to prevent this in the future.

**ALTERNATE SOLUTION:**  
Reflash the OS here:

> [@How to reflash the operating system on the Onefinity BB controller (Full SD card image)](https://forum.onefinitycnc.com/t/how-to-reflash-the-operating-system-on-the-onefinity-full-sd-card-image/5659):
>
> There are times when you may have a file go corrupt or (advanced) users start poking under the hood and may need to reflash the entire vanilla image to the sd card. This process is essentially reinstalling the Onefinity operating system from scratch. We offer preflashed SD cards with the latest stable firmware if you’d rather skip flashing yourself: [https://www.onefinitycnc.com/product-page/preflashed-micro-sd-card-for-bb-buildbotics-controllers-replacement](https://www.onefinitycnc.com/product-page/preflashed-micro-sd-card-for-bb-buildbotics-controllers-replacement) This process is only for advanced u…
