Terminal kung fu help - removing .meteor directory

I have 10-20 meteor projects that I would like to move to a external drive for the purpose of installing Ubuntu Gnome instead of the current Arch Linux. All of the meteor projects are in my home directory. Moving these files will result in .meteor folder being transferred which adds an additional 50 GB to the transfer.

I don’t want to bundle each app, as some of these apps are proof of concepts and not full fledged apps. Does anybody have a script or know how to remove .meteor in each subdirectory and moving the contents to the external.

Unfortunately, I have meetings all day, and I’m in a real pinch. Hopefully somebody can point me to the right direction on this.

Thank you!

Meteor projects compress really well (I see better than 10:1), so why not just tar and gzip your projects?

cd /path/to/base/dir
tar zcf /tmp/meteor.tar.gz .

(Assuming all your projects sit in /path/to/base/dir/). Copy /tmp/meteor.tar.gz onto your removable storage, build your new system, set up the new base directory, copy the gz file into /tmp and then:

cd /path/to/new/base/dir
tar zxf /tmp/meteor.tar.gz
1 Like

I don’t want to bundle each app, as some of these apps are proof of concepts and not full fledged apps. Does anybody have a script or know how to remove .meteor in each subdirectory and moving the contents to the external.

meteor reset

This should clean up some stuff in the .meteor directory. Are you sure it is meteor that is taking up that much of space?

$ rm -Rf <directory>/.meteor

Warning: it will destroy the entire contents of that directory! No coming back from this, no undo, no recycle bin, nada. It’s better to perform a backup and live through the day, zipping it all - like @robfallows tells.

If sizes really does matter, use bzip2 - its slower in compression but creates smaller files. Gzip is faster though.

$ tar -cvjSf folder.tar.bz2 folder

That’s a good idea - but it will wipe your database, so only do this if you don’t mind loading your collections from scratch (or have it independently backed up).

That’s a good idea - but it will wipe your database, so only do this if you don’t mind loading your collections from scratch (or have it independently backed up).

Indeed. It is however a better idea than just bluntly kick the contents to /dev/null

1 Like

Thank you for your help.

Removing .meteor/packages I think would be a mistake. As it would time consuming to try and figure out which package I used.

I should take your advice on gzip-ing the file and using meteor reset. Using FS Collection in some of these apps, which yields higher than normal GB’s.