Android Studio

How To Delete A Project In Android Studio

How To Delete A Project In Android Studio

How to delete a project in Android Studio starts with recognizing that the process happens on the file system, not inside a database.

An Android Studio project is a workspace folder that bundles an app’s source code, resources, and Gradle build scripts into a single unit the IDE opens and compiles.

The project folder sits on the local disk, separate from the IDE’s own settings, and Android Studio only remembers it through a shortcut on the welcome screen.

Google’s own configuration documentation lists the project directory, the Gradle cache, and the plugin folder as three independent default locations, each of which can be relocated on its own, a detail most walkthroughs skip entirely.

What Does Deleting A Project In Android Studio Mean

YouTube player

An Android Studio project is a self-contained workspace folder that the IDE treats as one compilable unit, holding source code, resources, and build configuration together.

Deleting that project means removing this workspace folder from the file system, not uninstalling an app from a phone or clearing data from Google Play.

The distinction matters because Android Studio itself, the SDK it uses, and the Android Studio IDE stay installed regardless of how many individual projects get removed from a machine.

A project is not the same thing as:

  • A module, which is one buildable component inside a larger project
  • An installed APK, which lives on a device or emulator, separate from the source folder
  • A Gradle build file, which configures the project but is only one file inside it

Where Android Studio Stores Project Files

Android Studio creates a new project inside an AndroidStudioProjects folder in the user’s home directory by default, according to a widely used developer tutorial from vogella.com.

That project root directory holds the .idea folder, the .gradle folder, the app module, build.gradle, settings.gradle, and local.properties, all sitting next to each other on disk.

Why does Android dominate the mobile world?

Uncover Android development statistics: market share dominance, developer opportunities, ecosystem growth, and mobile innovation trends.

Explore Android Insights →

Key figures on where the files actually live:

  • Default project folder: AndroidStudioProjects, inside the user’s home directory (vogella.com)
  • Gradle cache location: GRADLE_USER_HOME, defaulting to ~/.gradle or C:\Users\username\.gradle (Gradle documentation)
  • Cache retention: unused release-version caches inside that folder are deleted automatically after 30 days of inactivity, snapshot caches after 7 days (Gradle documentation)
  • Plugin folder path: set through the idea.properties configuration file, separate from the project folder itself (Android Developers documentation)

None of these locations get removed automatically just because a project folder is deleted, which is why leftover cache files often outlive the project that created them.

Closing A Project Versus Deleting It

Close: returns the IDE to the welcome screen, releases file locks, and keeps every file exactly where it was.

Delete: removes the project folder from disk, permanently, unless a backup exists somewhere else.

Closing first is not optional if the goal is a clean deletion afterward, since an open project keeps its Gradle daemon and indexing process attached to the folder.

New to ADB or just need a quick reference? Device management, file transfers, and shell commands - including adb devices, adb push/pull, and logcat - is on one page in the ADB Commands Cheat Sheet.

If the actual goal is a fresh name rather than a fresh start, renaming the Android Studio project solves the problem without touching any source files at all.

Removing A Project From The Recent Projects List

The recent projects list is a shortcut list, not a copy of the project itself, so clearing an entry here changes nothing about the files on disk.

JetBrains’ own Welcome Screen documentation describes the process as a two-step action: select the entry, then press Delete to open a confirmation dialog before it disappears from the list.

  1. Right-click the project entry on the welcome screen and choose Remove Selected from Welcome Screen
  2. Or select the entry and press the Delete key, then confirm in the dialog that appears

A project removed from this list this way can still be reopened later through File, Open, by browsing to wherever the folder still sits.

How To Delete A Project On Windows

Windows locks files that a running process still references, so the order of operations here decides whether the delete succeeds on the first try.

  1. Open File, Close Project to return to the welcome screen and release active file locks
  2. Remove the entry from the recent projects list if it should no longer appear there
  3. Open File Explorer and navigate to the project folder, by default under C:\Users\Username\AndroidStudioProjects
  4. Select the project folder and press Shift+Delete for a permanent removal, or Delete to send it to the Recycle Bin first
  5. Empty the Recycle Bin afterward if the disk space needs to be reclaimed immediately

An Access Denied error at step 4 usually means Android Studio or a stray Gradle daemon process is still holding a file open in that folder.

How To Delete A Project On macOS

macOS handles this more forgivingly than Windows, since Finder rarely locks a folder the way Windows Explorer does.

Quitting Android Studio completely, not just closing the project window, avoids any leftover background indexing on the folder before deletion.

  1. Select File, Close Project from the menu bar
  2. Quit Android Studio entirely if other project windows are open
  3. Open Finder and go to the project folder, by default under ~/AndroidStudioProjects
  4. Drag the folder to Trash, or select it and press Command+Delete
  5. Empty Trash from the Finder menu to remove it permanently

Quick checks before deleting on macOS:

  • No emulator window still open for that project
  • Terminal not sitting inside the project directory
  • Any needed files already copied elsewhere

How To Delete A Project On Linux

Linux gives two paths here: a graphical file manager that mirrors the macOS and Windows experience, or a direct terminal command for anyone comfortable with bash.

  1. Close the project through File, Close Project inside Android Studio
  2. Confirm no leftover Gradle daemon process is still attached to that project, using a process list command if unsure
  3. Navigate to the project folder, typically under ~/AndroidStudioProjects, through either the file manager or a terminal
  4. Delete it with the file manager’s trash option, or run rm -rf on the folder from bash
  5. List the parent directory afterward to confirm the folder is gone

rm -rf skips the trash entirely. There is no undo once that command finishes, which is a very different outcome from dragging a folder into a desktop trash bin.

Clearing Gradle Cache And Build Files After Deleting A Project

Removing the project folder does not touch the Gradle cache, because that cache lives inside GRADLE_USER_HOME, a location shared by every project on the machine.

The build folder inside the old project is already gone once the folder itself is deleted, so there is nothing extra to clean up at that specific path.

What stays behind after a project delete:

  • Downloaded dependency jars inside the shared Gradle cache
  • Gradle daemon processes still running in memory until they time out
  • Any Android Virtual Device images created specifically for that project’s testing

Running File, Invalidate Caches / Restart on a different project clears Android Studio’s own indexing cache, separate from the Gradle cache, and is worth doing if the IDE still references paths from the deleted project.

Reopening a fresh clone later and letting Android Studio run a Gradle sync rebuilds everything the deleted build folder used to hold, without needing the original files back.

Handling The Git Repository Before Deleting A Project

A project tracked with Git keeps its full commit history inside a hidden .git folder at the project root, completely separate from the source files it tracks.

Deleting the project folder deletes that git repository too, along with every commit that was never pushed to a remote.

Before deleting a version-controlled project, confirm:

  • The last commit was pushed to GitHub or another remote
  • No uncommitted changes sit in the working directory (check with a status command)
  • Branches worth keeping have already been merged or pushed

A .gitignore file inside the project already excludes the .gradle and build folders from version control, so a pushed remote copy never contained those generated files in the first place.

Deleting A Module Versus Deleting An Entire Project

A module is one buildable piece inside a project, and removing it is a much smaller operation than deleting the whole workspace.

ActionWhat it removesWhen to use it
Delete moduleOne module’s folder and its Gradle referenceDropping one library or feature from a multi-module app
Delete projectEvery module, the .idea folder, and all build filesAbandoning the whole app entirely
Remove from recent listOnly the IDE shortcut, nothing on diskTidying the welcome screen without losing files

Right-clicking a module in the Project panel and choosing Delete removes it from settings.gradle and deletes its folder, but leaves every other module and the root project untouched.

When Project Deletion Fails Or Does Not Apply

Project deletion through the operating system fails or causes problems in a handful of predictable situations.

Locked files: Android Studio, an emulator, or a leftover Gradle daemon still has a file open, producing an Access Denied or Resource Busy error.

Wrong folder: two similarly named projects exist under AndroidStudioProjects, and the wrong one gets removed by mistake.

Cloud-synced folders: a project stored inside a Dropbox or OneDrive folder can partially delete, then resync from the cloud copy before the operation finishes.

Shared repositories: deleting a local clone that other teammates still depend on for pushes does not delete anything on the remote, but it does delete any local branches that were never pushed.

None of the deletion methods covered here apply to an app already published on the Google Play Store, since removing local project files has no effect on a live listing or its installed base.

Recovering Or Backing Up A Project Before Permanent Deletion

Recovery only works when a copy already exists somewhere else before the deletion happens, since Android Studio has no built-in undo for a removed folder.

Git remote backup:

  • Preserves full commit history
  • Free on GitHub for most personal projects
  • Requires the project to already be under version control

Manual copy to external storage:

  • Works for projects with no Git setup at all
  • Slower to restore than a git clone
  • Duplicates the Gradle cache files unless they get excluded first

Time Machine on macOS and File History on Windows both capture whole-folder snapshots automatically, which recovers a project even when nobody remembered to back it up manually that day.

Cloning the repository to a new folder before deleting the original confirms the backup actually works, rather than trusting an untested copy.

FAQ on How To Delete A Project In Android Studio

Does deleting a project remove its APK from a connected device?

Deleting the project folder only removes files on the development machine. Any APK already installed on an Android Virtual Device or a physical phone stays put until it is uninstalled separately through the device settings or an adb uninstall command.

Can a project be deleted while an emulator built from it is still running?

Deleting files while an Android Virtual Device launched from that project is still running can lock some files on Windows. Closing the emulator and the project window first avoids file lock errors during the delete.

Does deleting a project break a linked Firebase or Google Cloud project?

A linked Firebase project or Google Cloud service keeps running on its own servers. Deleting the local Android Studio project only removes the google-services.json file and local references, so the remote configuration stays untouched.

Does Android Studio ask for confirmation before a permanent deletion?

Android Studio shows no warning for a project deleted outside the IDE. The operating system’s own file manager, whether Windows File Explorer, macOS Finder, or a Linux terminal, handles that step instead.

Do multiple Android Studio projects share the same Gradle cache?

Yes. Every Android Studio project on a machine points to the same Gradle user home by default, so its dependency cache and daemon are shared across projects rather than duplicated per folder.

What happens to an interrupted Gradle sync if you delete a project mid sync?

An interrupted sync leaves partial files in the .gradle and build folders. Deleting the project while sync is running can leave a project.lock file behind, cleared by removing the cache folder afterward.

Can a deleted project be restored from a cloud backup service?

Recovery only works if a copy exists somewhere else first. Google Drive, OneDrive, or a git remote can restore a deleted project, but Android Studio itself has no built-in trash for project folders.

Does clearing the recent projects list free up any disk space?

No. The recent projects list is a shortcut list stored in the IDE’s own configuration files, separate from the project folders on disk. Clearing entries there changes nothing about actual disk usage.

Is there a keyboard shortcut for removing a project from Android Studio?

Android Studio has no dedicated shortcut for deleting a project. Removing an entry from the welcome screen uses a right click or a small delete icon, and full deletion still needs the operating system.

Does deleting a project change any global Android Studio settings?

Deleting a project does not touch global IDE preferences, SDK Manager configuration, or AVD Manager device profiles. Those settings live outside any single project folder and remain available the next time Android Studio opens.

What Should You Do First in How To Delete A Project In Android Studio?

Deleting a project in Android Studio safely starts with closing the IDE and stopping the Gradle daemon, backing up the folder to a git remote or cloud drive, and only then removing it through the operating system’s file manager.

Close the project window first, stop the Gradle daemon second, and delete the folder third, because Windows and macOS both keep files locked while a build process still references them.

Skipping the backup step saves a minute up front, but it removes the only path back to committed work if the wrong folder gets deleted.

Readers who want the IDE gone entirely, not just one project, can look at uninstalling Android Studio as the next step, since that process removes the SDK, AVD images, and cache folders this guide leaves untouched.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.