Accidently Deleted src Folder

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.

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

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


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?

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:

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


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.

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.

Thanks, issue solved

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