Remove applications
You can remove an app or container from a Pantavisor-enabled device using the pvr command-line interface (CLI). The process involves cloning the device’s current state, removing the app locally, and then posting the new revision back to the device.
Step 1: Clone the Device State
First, if you haven’t already, clone the device’s configuration to your local machine. This creates a directory that mirrors the device’s software components.
Run the pvr clone command, replacing <DEVICE_IP> with your device’s address and my-device with your preferred local directory name.
pvr clone <DEVICE_IP>:12368/cgi-bin my-device
cd my-deviceInside, you will find a file structure representing your device’s components.
Step 2: Remove the App
To remove an app, use the pvr app rm command. For this example, we’ll remove the pvwificonnect app.
pvr app rm pvwificonnectThis action tells Pantavisor that this component should no longer be part of the device’s state.
Step 3: Commit and Post the New Revision
Next, you need to stage and commit this change.
- Stage the change (the deletion of the directory):
pvr add .- Commit the change with a descriptive message:
pvr commit -m "Removed the pvwificonnect app"- Finally, post the new revision to the device.
pvr postStep 4: Finalizing the Update
After you run pvr post, the Pantavisor agent on the device will download and apply the new revision. It will stop and remove the container you deleted. Once the update is successfully applied, the device will reboot with the new configuration, and the app will be gone.
Next Steps
- Return to the Applications Overview.
- Explore Building your own Pantavisor images.