mu92's avatar
Level 1

how i undo php artisan storage:link

i run this command now i want to remove this, how i can undo this.

0 likes
11 replies
bobbybouwmann's avatar

You can simply remove the the storage directory/link in your public directory. Something like this should do

// Assuming you are at the root of your project
rm -rf public/storage

Note: The storage link is linked to the storage/app/public directory, so you won't be throwing away anything since it's just a simlink ;)

10 likes
martinbean's avatar

@Jonjie Did you really bump a thread that’s half a decade old just to go “yeah, it works”…?

Jonjie's avatar

@martinbean What's wrong with my comment? It is to confirm that it is still working just like what bobbybouwmann said. Be nice to people because you were once a beginner like me. Thanks for that bro @bobbybouwmann, I appreciate it.

2 likes
NielsNumbers's avatar

@bobbybouwmann I would not use -rf because -r will remove directories and their contents recursively, and -f surpresses prompt.

So i would just do

rm public/storage

Also not do NOT

rm -r public/storage/

that would remove everthing you have inside your storage folder. Respect the slash

2 likes
sudhir2518's avatar

where to put this 'rm public/storage' ? is it artisan command or what? it is not working on the command line

automica's avatar

You would run that command on commandline at the same level as your storage directory

Please or to participate in this conversation.