 				@devices = devices
 
 		after ->
-			Bluebird.props _.mapValues(@apps, 'id'),
-				balena.models.application.remove
+			balena.pine.delete({
+				resource: 'application',
+				options: {
+					$filter: {
+						id: {
+							$in: _.map(@apps, 'id')
+						}
+					}
+				}
+			})
 
 		describe 'balena.models.device.move()', ->
 

					@deviceInfo = deviceInfo

		afterEach ->
			Bluebird.map [
				@application1.id
				@application2.id
				@application3.id
			], balena.models.application.remove

		describe 'balena.models.device.move()', ->


					@deviceInfo = deviceInfo

		afterEach ->
			balena.pine.delete({
				resource: 'application',
				options: {
					$filter: {
						id: {
							$in: [
								@application1.id
								@application2.id
							]
						}
					}
				}
			})

		describe 'balena.models.device.move()', ->

