# Delete a location

## Overview

This flow describes how to delete a [location](https://docs.ohc.network/concepts/facility/location.md), such as a building, a ward or a bed, from the facility.

Care offers **Delete** only for a location that holds no other locations and has no patient on it.

[Video: Delete a location](https://www.youtube.com/watch?v=-j593gA7PHk)

## Pre-requisites

* You can open the facility in Care. You hold a role in the facility, or you belong to a government organization that covers the facility.
* If the location holds sub-locations or beds, delete them first. Care does not delete a location while it holds other locations.
* If a patient is on the location, change or end the patient's location from the encounter first. See [Assign an encounter location](https://docs.ohc.network/flows/clinical/encounter/assign-encounter-location.md).
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Create/Update Facility Locations | Lets you delete the location. You need it on the location. By default, the Facility Admin and Staff roles hold it. |
| Can List Facility Locations | Lets you find and open the location. You need it on the location. Without it, Care cannot find the location, even if you hold the other permission. By default, the Doctor, Nurse, Staff, Pharmacist, Administrator and Facility Admin roles hold it. |

You hold a permission on a location when a role in one of these places gives it to you:

* A department linked to the location, or to a location that holds the location.
* A parent department of such a department.
* The facility's root department, Administration. A role there reaches every location of the facility.

By default, if you hold the Facility Admin or Staff role in one of these places, you have both permissions.

## Steps

### 1. Find the location

Open the facility.

In the facility sidebar, select **Settings**.

In the settings sidebar, under **Facility**, select **Locations**.

Find the location in the location tree or in the list. See [View locations](https://docs.ohc.network/flows/facility/location/view-locations.md).

With no location open, the list shows the top-level locations as rows.

Inside an opened location, the list shows its sub-locations as rows under **Sub-locations**, and its beds as tiles under **Beds**.

![The page of Ward 3, with the row of Linen Store at the end of the list under Sub-locations.](/assets/images/delete-location-1-6ac2869588d4ac0b734f61a5464a026b.webp)

### 2. Select Delete

Select **Delete** in one of these ways:

* On the row of the location, or on the tile of the bed, select the "⋮" menu. Then select **Delete**.
* Open the **Edit Location** sheet. See [Edit a location](https://docs.ohc.network/flows/facility/location/edit-location.md). In the **Delete this location** row, select **Delete**.

![The menu on the row of Linen Store open, with Move Up and Delete.](/assets/images/delete-location-2-19ca0ed19bf4c355c39764075e2b98d8.webp)

The **Delete this location** row warns **This action cannot be undone.**

If you cannot find **Delete**, the location holds other locations or has a patient on it.

### 3. Confirm the deletion

Care opens a confirmation dialog. Its title is "Remove", followed by the location name.

The dialog asks if you are sure that you want to delete the location.

To delete the location, select **Remove**. To keep it, select **Cancel**.

![The confirmation dialog Remove Linen Store, asking if you are sure you want to delete Linen Store, with the Cancel and Remove buttons.](/assets/images/delete-location-3-f5a3d46470d3ba52dbc98cff534b112e.webp)

Care deletes the location and shows **Location removed successfully**.

![The message Location removed successfully, with Linen Store gone from the list of Ward 3.](/assets/images/delete-location-4-cf9fa8dd3d40695a4c108b8073b3a360.webp)

## Expected Outcome

* The location no longer shows in **Settings** > **Locations**.
* If you deleted the location that was open, Care opens the location that held it.
* If that location was a top-level location, Care opens the **Locations** list.

## Related

Concepts:

* [Locations](https://docs.ohc.network/concepts/facility/location.md)

Flows:

* [View locations](https://docs.ohc.network/flows/facility/location/view-locations.md)
* [Edit a location](https://docs.ohc.network/flows/facility/location/edit-location.md)
* [Assign an encounter location](https://docs.ohc.network/flows/clinical/encounter/assign-encounter-location.md)
