# Accidently Deleted src Folder

**URL:** <https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709>\
**Category:** ROS2 Basics in 5 Days Humble (Python)\
**Created:** [February 4, 2025, 6:25am UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709 "2025-02-04T06:25:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaumitraKapoor](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@SaumitraKapoor](https://get-help.theconstruct.ai/u/SaumitraKapoor)\
**Post date:** [February 4, 2025, 6:25am UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/1 "2025-02-04T06:25:12Z")

</div>

I accidently deleted the src folder. How can I restore?

Previous topics discussed logging out then logging back again to see the default version of src folder but I still can’t find it.

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [February 4, 2025, 8:30am UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/2 "2025-02-04T08:30:58Z")

</div>

I have restored a version of your workspace from yesterday. Please let us know if that works for you.

---

<div class="post-metadata">

**Author:** ![SaumitraKapoor](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@SaumitraKapoor](https://get-help.theconstruct.ai/u/SaumitraKapoor)\
**Post date:** [February 4, 2025, 8:51am UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/3 "2025-02-04T08:51:30Z")

</div>

Hi, I still can’t see the src files.

---

<div class="post-metadata">

**Author:** ![SaumitraKapoor](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@SaumitraKapoor](https://get-help.theconstruct.ai/u/SaumitraKapoor)\
**Post date:** [February 4, 2025, 8:55am UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/4 "2025-02-04T08:55:47Z")

</div>

![Screenshot 2025-02-04 at 4.54.50 PM](https://get-help.theconstruct.ai/uploads/default/original/2X/8/8be0affc0fe7db61ae5795de5325d09ce2761321.png)  
As you can see in the screenshot there is just one file in the src folder and I can’t see rest of the deleted files. If possible could you pls reset the src folder?

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [February 4, 2025, 10:42am UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/5 "2025-02-04T10:42:16Z")

</div>

If the files you deleted were created in the same session where you deleted them, unfortunately they we won’t be in our archives.

But if you created them in a previous session and then deleted them in another session, we could have them in the archives.

What do you mean by “reset the src folder”? If you wish to clear the folder, you could run the following commands:

```auto
cd ros2_ws
rm -rf build/ install/ log/
rm -if src/*

```

---

<div class="post-metadata">

**Author:** ![SaumitraKapoor](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@SaumitraKapoor](https://get-help.theconstruct.ai/u/SaumitraKapoor)\
**Post date:** [February 4, 2025, 10:51am UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/6 "2025-02-04T10:51:54Z")

</div>

![image](https://get-help.theconstruct.ai/uploads/default/original/2X/d/d68edf54839a29b42dc87609d788fa1316e86468.png)  
By reset the src folder, I meant have the default files back.

When I started the course, there were certain files like setup.py, package.xml etc.

I wish to restore these default files so I can begine from fresh.

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [February 4, 2025, 12:08pm UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/7 "2025-02-04T12:08:40Z")

</div>

Those files were not in `ros2_ws/src` directly. They were inside specific packages (like `mars_rover_systems`). You should have some instructions at the beginning of the course for copying that package or any other default packages.

---

<div class="post-metadata">

**Author:** ![SaumitraKapoor](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@SaumitraKapoor](https://get-help.theconstruct.ai/u/SaumitraKapoor)\
**Post date:** [February 4, 2025, 12:18pm UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/8 "2025-02-04T12:18:34Z")

</div>

Thanks, issue solved

---

<div class="post-metadata">

**Author:** ![system](https://get-help.theconstruct.ai/uploads/default/original/2X/9/9d3ce8305cc0d0d9b6e07d15767a6f245c526f1b.jpeg) [@system](https://get-help.theconstruct.ai/u/system)\
**Post date:** [February 9, 2025, 12:18pm UTC](https://get-help.theconstruct.ai/t/accidently-deleted-src-folder/34709/9 "2025-02-09T12:18:54Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
