---
title: removeConnection(String profileName)
slug: isac/admin-guide/android/removeconnectionstring-profilename
docTags: 
createdAt: 2026-07-23T05:01:25.255Z
---

Removes an existing VPN profile.Syntax:

### Syntax:

int removeConnection(String profileName)

### Parameters:

The profileName is the name of a VPN profile that was created with the functions addVPNConnection or [createConnection(String jsonProfile)](docId\:LUWLKIP6na8XkQpluAl0y).

### Returns:

This method returns 0 on success, 1 if the profile does not exist, and -1 on other errors. One of the other errors occurs when an active VPN session is using the profile. When this method returns 1 or -1, the caller can call getErrorString() to obtain a description of the error.

### Since:

R3
